> So today I use 986446800 and tomorrow I use 986533200 (values generated by
> `date +%s`). I know this looks ugly compared to the other format.
>
> However, remember that these values are going to be computer-generated.
>
> The benefit of this method comes when you're trolling through different
> days. If you write a daemon to troll an index and get all the keys from
> multiple days, with an mmddyy sort of format you have to know when to stop
> incrementing the dd field and increment the mm field and reset the dd
> field. So you have to use a calendar. With the seconds since the epoch
> method you just add 86400 for each day.

Well, every reasonable programming language out there has date functions.
And in all languages I know it is very easy to convert between dates and
seconds-since-epoch.

And the yymmdd approach has the advantage that the number is human-readable.

Another problem is - in different timezones, don't you get different values
for midnight?

I'm very much in favor of the yymmdd solution...

> I'll be using the scheme above. I could do this today, perhaps. It's quite
> pretty easy to code.

Where do you put the date information then? At the end, separated by a
minus, like I did?

-Stefan


_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to