replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Date_and_Time for daylight saving
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Date_and_Time for daylight saving

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Wed Oct 12, 2011 1:36 am    Post subject: Date_and_Time for daylight saving Reply with quote

This may be a note only, but I have tested DATE_AND_TIME and it reports the standard time zone, without any daylight saving modification.
For Sydney today with daylight saving, where the local time is 11 hours ahead of UTC/GMT, VALUES(4) is reported as 600.
I looked at the time zone in task bar and it reports "(GMT+10:00)" but selects automatically adjust for daylight saving changes.
However, Values(5) is reporting the correct local hour for daylight saving time.
I notice on the forum web site that before I log in, local time is reported with daylight saving time still in place for Grenwich (?) but reports my local time as GMT+10hr after I log in, which is out by 1 hour.
I'm not sure how Windows XP implements daylight savings.

Should VALUES(4) = 660 (current local minutes agead of UTC/GMT) be the expected result or has XP fudged the time for daylight savings ?

The relevance of this is that FILES@ reports the dos_date and dos_time wrt UTC, which needs to be corrected to local time (potentially with the daylight savings adjustment at the time the file was last modified !!)

John
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Wed Oct 12, 2011 8:02 am    Post subject: Reply with quote

I have not investigated this issue but here is the relevant code for DATE_AND_TIME from the FTN95 library...

Code:
    SYSTEMTIME time;
    GetLocalTime(&time);
    timezone = get_time_zone_bias();
    if (timezone == 0x80000001) timezone = 0;


where get_time_zone_bias is...

Code:
long get_time_zone_bias()
{
  TIME_ZONE_INFORMATION time_zone;
  long result;
  result= GetTimeZoneInformation(&time_zone);
  if(result == 0xffffffff)
  {
    return 0x80000001;  // -HUGE(0)
  }
  else
  {
    return -time_zone.Bias;
  }
}
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group