?
Solved

Dates and Times in NT

Posted on 2000-04-10
3
Medium Priority
?
297 Views
Last Modified: 2013-12-28
What timezone is used when computing
dates and times in DATE, DBTYPE_DATE,
DBTYPE_DBDATE, DBTYPE_DBTIME, FILETIME
and other microsoft defined date and
time formats.

Is it the time relative to the machines
local time, GMT time, or something else
again.

Microsoft's documentation would suggest
that they've never heard of timezones
and this leaves me bemused..

Thanks, Ian
0
Comment
Question by:ijdavis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Expert Comment

by:gcs001
ID: 2702401
The timezone you set for your computer is sometimes used in certain programs that use International Settings.  This can affect the way your computer displays the date and time.

In normal circumstances a program will use the system date and time it has been set to without regard to the timezone (International Settings) you have selected.

I have no idea which programs use the timezone setting - but I guess some web-sites would use it to probably determine the exact time a web page was accessed or something like that.
0
 
LVL 1

Accepted Solution

by:
Assafgo earned 200 total points
ID: 2703509
Ian, notice that microsoft sometimes makes differences between GetSystemTime..., which is in UTC - without the time zone and functions as
GetLocalTime, which actually take the afor-mentioned functions and add the Timezone difference.
If not mentioned, microsoft works with 'system' time, but you can add yourself the timezone with the function
GetTimeZoneInformation which translates between the two times.
if you want to be sure, the function GetSystemTimeAsFileTime always gets FILETIME as system time
and you have also conversion functions
for switching such as
FileTimeToLocalFileTime,
FileTimeToSystemTime and
LocalFileTimeToFileTime.

You ca also use the SYSTEMTIME structure with either GetSystemTime or GetLocalTime and then you can be sure what you get.
then use SystemTimeToFileTime for conversion
0
 

Author Comment

by:ijdavis
ID: 2706369
Thanks a million for giving me the
means to answer the question asked.
Your answer was several order of
magnitude clearer than microsofts
explanations..

I'm going to assume that what is
true for DBTYPE_FILETIME also applied
for DBTYPE_DATE, DBTYPE_DBTIME,
DBTYPE_DBDATE and DBTYPE_DBTIMESTAMP.

Ian.
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A small collection of useful tips and tricks for Windows 10 users that I decided to write as a result of recent questions that were asked and answered at Experts Exchange. Two short video tutorials included. Enjoy..
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question