[Gambas-user] gb3: date/time reporting odd fractional value

John Spikowski support at ...2529...
Thu Jun 23 10:35:41 CEST 2011


On Thu, 2011-06-23 at 04:16 -0400, Kevin Fishburne wrote:
> On 06/23/2011 03:54 AM, John Spikowski wrote:
> > On Thu, 2011-06-23 at 03:16 -0400, Kevin Fishburne wrote:
> >
> >> I'm reading about GMT on Wikipedia now... How would one interpret the
> >> returned values with respect to GMT?
> >>
> > There are 25 integer World Time Zones from -12 through 0 (GMT) to +12.
> > Each one is 15° of Longitude as measured East and West from the Prime
> > Meridian of the World at Greenwich, England.
> 
> Thank you.
> 
> Why should I have to reference a time zone when sending a float between 
> two computers? The date sent is artificial, so maybe it's affected by 
> localization or something weird like that. Are date functions 
> automatically calculated against the host machine's system clock and 
> time zone?
> 

The time returned by Linux is seconds past midnight of Jan. 1st 1970.
(based on GMT) Here is a ScriptBasic example to explain.

PRINT "Seconds past Jan. 1st, 1970 at midnight GMT","\n\n"
PRINT "Local: ",NOW,"\n"
PRINT "  GMT: ",GMTIME,"\n"

jrs at ...1833...:~/sb/test$ scriba Linux_Time
Seconds past Jan. 1st, 1970 at midnight GMT

Local: 1308792888
  GMT: 1308818088
jrs at ...1833...:~/sb/test$ 






More information about the User mailing list