[Gambas-user] Unix Date conversion

sbungay sbungay at ...981...
Mon Jul 24 14:55:12 CEST 2006


   I was afraid of that... not my data.. created by someone elses php 
script... will now have a look at their code to see what they are up to.

Benoit Minisini wrote:
> On Monday 24 July 2006 14:37, MrBiTs wrote:
> 
>>/*
>>    That is correct. # of seconds since 1/1/1970.
>>*/
>>
>>Number of seconds since 1/1/1970 00:00:00 GMT.
>>
>>In perl, for example, we have a very simple line to convert Unix Timestamp
>>into human-readable format:
>>
>>$ perl -e "print scalar localtime(0);"
>>Wed Dec 31 21:00:00 1969
>>
>>As I told, this is GMT based. So, here in Brazil we  have GMT-3, then
>>that's correct.
>>
>>CheerS
>>
>>
> 
> 
> I have read the man page...
> 
> Actually this is *not* the true number of seconds before 1/1/1970, because:
> - All years divisible by four are considered leap years.
> - Sometimes a leap second is added to some years, and it is ignored.
> 
> So maybe a dedicated function is needed...
> 




More information about the User mailing list