[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Monotone displays commit times in UTC, not local ti
From: |
Nuno Lucas |
Subject: |
Re: [Monotone-devel] Monotone displays commit times in UTC, not local time |
Date: |
Thu, 5 Jun 2008 17:26:20 +0100 |
On Thu, Jun 5, 2008 at 3:00 PM, Matthew Nicholson <address@hidden> wrote:
> Zack Weinberg wrote:
>>
>> On Wed, Jun 4, 2008 at 3:25 AM, Tim Kettler <address@hidden> wrote:
>>>
>>> I just noticed that monotone displays the commit time for changes
>>> (printed
>>> by 'mtn log') in UTC and not my local time. Is this the wanted behaviour?
>>> If
>>> not, does anybody else see this or is it just some misconfiguration on my
>>> machine?
>>
>> I wouldn't call it _desirable_, but it is the expected behavior.
>> Dates are stored as strings in the database, in exactly the format you
>> see them, in UTC. When they're printed, we just print them out as
>> strings. This is because doing a time zone conversion is fraught with
>> portability issues, and so it's more trouble than anyone's wanted to
>> go to.
>>
>> Feel free to send in patches :)
>>
>> zw
>>
>
> Boost.DateTime can parse the exact string that we store in the database and
> convert it to local time. It should be an easy patch to write. Not sure
> how that would affect performance or if we are willing to link with boost
> date_time.
Or you could just use the sqlite date/time functions[1] to have it
return localtime instead of UTC.
Regards,
~Nuno Lucas
[1]
http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
- [Monotone-devel] Monotone displays commit times in UTC, not local time, Tim Kettler, 2008/06/04
- Re: [Monotone-devel] Monotone displays commit times in UTC, not local time, Zack Weinberg, 2008/06/04
- Re: [Monotone-devel] Monotone displays commit times in UTC, not local time, Matthew Nicholson, 2008/06/05
- Re: [Monotone-devel] Monotone displays commit times in UTC, not local time,
Nuno Lucas <=
- Re: [Monotone-devel] Monotone displays commit times in UTC, not local time, Zack Weinberg, 2008/06/05
- Re: [Monotone-devel] Monotone displays commit times in UTC, not local time, Thomas Moschny, 2008/06/05
- Re: [Monotone-devel] Monotone displays commit times in UTC, not local time, Derek Scherger, 2008/06/07
- Re: [Monotone-devel] Monotone displays commit times in UTC, not local time, Zack Weinberg, 2008/06/05
- Re: [Monotone-devel] Monotone displays commit times in UTC, not local time, Matthew A. Nicholson, 2008/06/05
- Re: [Monotone-devel] Monotone displays commit times in UTC, not local time, Zack Weinberg, 2008/06/05