Re: [Monotone-devel] Re: dates in monotone

2008-10-16 Thread Markus Wanner
Hi, Lapo Luchini wrote: > BTW: when using 64 bits isn't it usual to store signed milliseconds as > opposed to unsigned seconds? Yeah, thanks, good point. I'm using 1/100th seconds in nvm.cvsimport-branch-reconstruction already anyway... date_t would get even more usable there when using milliseco

[Monotone-devel] Re: dates in monotone

2008-10-16 Thread Lapo Luchini
Markus Wanner wrote: > Zack Weinberg wrote: >> I will not have time to look at the code until later today or perhaps >> even tomorrow. In the meantime: are you storing Unix-epoch second >> counts in the database? If so, then yes, I object, for the reasons in >> my second message. > > No, I've on

[Monotone-devel] Re: dates in monotone

2008-10-16 Thread Markus Wanner
Hi, Zack Weinberg wrote: > I will not have time to look at the code until later today or perhaps > even tomorrow. In the meantime: are you storing Unix-epoch second > counts in the database? If so, then yes, I object, for the reasons in > my second message. No, I've only changed the internal re

[Monotone-devel] Re: dates in monotone

2008-10-16 Thread Markus Wanner
Hi, Zack Weinberg wrote: > I should add that this is only a problem because the CVS file format > uses Unix-epoch second counts as a storage representation. The > standards say nothing about the epoch used by time_t; it's not even > guaranteed to be an arithmetic type! The problematic Windows gm

[Monotone-devel] Re: dates in monotone

2008-10-16 Thread Zack Weinberg
On Thu, Oct 16, 2008 at 9:24 AM, Markus Wanner <[EMAIL PROTECTED]> wrote: > Okay, thanks. Looks like enough reason to leave our own implementations > of gmtime() and mktime() in there. I will mention these OSes in the > comments, then. > > Any objections against landing nvm.dates on mainline? I wi

[Monotone-devel] Re: dates in monotone

2008-10-16 Thread Markus Wanner
Hi, Zack Weinberg wrote: > Yes. Some (not all) Windows C runtime libraries (or possibly > operating system major releases, I didn't investigate this in detail) > use a different epoch and/or don't implement the distinction between > UTC and local time correctly. It would also be a problem if we

[Monotone-devel] Re: dates in monotone

2008-10-16 Thread Zack Weinberg
On Thu, Oct 16, 2008 at 8:48 AM, Zack Weinberg <[EMAIL PROTECTED]> wrote: > On Thu, Oct 16, 2008 at 7:07 AM, Markus Wanner <[EMAIL PROTECTED]> wrote: >> >> Are the mktime() and gmtime() system functions really that unusable for >> portable >> software? > > Yes. Some (not all) Windows C runtime li

[Monotone-devel] Re: dates in monotone

2008-10-16 Thread Zack Weinberg
On Thu, Oct 16, 2008 at 7:07 AM, Markus Wanner <[EMAIL PROTECTED]> wrote: > > While that's find and dandy, I'm still wondering why we (uhm.. Zack) > have implemented gmtime() from scratch. The comments tell something > about systems not using the Unix epoch. But which system? Are the > mktime() and