[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Friday the 13th



On 2009-02-10_12:02:21, John Hasler wrote:
> Teemu Likonen writes:
> > But in international communication timezone information is sometimes
> > important.
> 
> There is no hope of it ever being implemented of course, but what would
> really be useful would be a standard whereby dates and times (even when
> embedded in text) would transmitted and stored in UTC but displayed
> according to the locale of the user.
> -- 
> John Hasler

I just learned a few days ago that there is a standard for the Date:
header in email. The format for the date (and time) in this header is
given by rfc-2822. Everything necessary to determine Unix time is available.
In effect, your wish is already reality. Or at least, it is reality in the
computer, internet world. 

date +%s -d "<enter date string from Date: header here>"

will get you seconds since Unix epoch. If you leave off the time zone, it
will assume local time zone for your computer, but the tz info _is_ part
of the standard, and most implementations of date, implement the standard.

-- 
Paul E Condon           
pecondon@mesanetworks.net


Reply to: