[clug] Re: Calculating the actual date and time]

Kim Holburn kim at holburn.net
Thu Mar 15 08:45:22 GMT 2007

On 2007/Mar/15, at 7:11 AM, Robert Thorsby wrote:

> On 2007.03.15 16:19 Basil Chupin wrote:
>> I also used the URL, epoch_conversion, which Tony provided and  
>> this really created a big question mark
>> about how reliable/accurate this calculation business really is.
>> By this I mean that using
>> 'date --date=' for 1168396306 seconds I get-
>> 10 January 2007 13:31:46 EST
>> NOTE: not EDT, daylight saving time,
>> even though my clock is set to EDT
>> but when using the epoch converter I get this-
>> 9 January 2007 09:31:46 GMT
>> epoch converter gives time as GMT
>> but this GMT time cannot be correct - unless
>> I have missed something (never been good
>> when dealing with time zones).
> On my reading of date's info page it appears that all calculations  
> relative to the epoch are in UTC (which makes sense) and that the  
> output to stdout is in whatever format (a) is requested through the  
> "+%..." formatting arguments, or in default (b) whatever your  
> system clock is set to deliver.
> You can play around with the date command by trying:
> date -d "1970-01-01 00:00:00 UTC + 1168396306 seconds"
> and then adding your formatting arguments. Also, try deleting the  
> "UTC" and see what happens -- as you predicated the difference is  
> 10 hours, not 11. Indeed, if you add the -R switch (for FRC[2]822  
> conformity) you will get results with and without "UTC" that cannot  
> both be correct.
> BTW, I thought that timezone acronyms ignored daylight saving --  
> that is, according to the date command we are EST and not EDST (or  
> whatever) even though we are currently +1100. Is that why RFC822  
> dropped timezone acronyms in favour of numbers for email timestamping?

Yeah it was Eastern Standard Time (EST) versus Eastern Summer Time  
(EST) versus Australian Eastern Standard Time (AEST) ...  The list  
goes on and is ridiculous.  The US uses EST as well for one of it's  
timezones.  +1100 is so much clearer.  If there had been a usable  
world standard it might have got used.

> Basil Chupin -- Bureau of Census & Stats -- Sydney Office -- late  
> 60s/early 70s??? If so, g'day: if not, g'day anyway.
> Robert Thorsby
> -- 
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux

Kim Holburn
IT Network & Security Consultant
Ph: +39 06 855 4294  M: +39 3494957443
mailto:kim at holburn.net  aim://kimholburn
skype://kholburn - PGP Public Key on request

Democracy imposed from without is the severest form of tyranny.
                           -- Lloyd Biggle, Jr. Analog, Apr 1961

More information about the linux mailing list