Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 921165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:49:47+00:00 2026-05-15T18:49:47+00:00

Customers from around the world can send certain ‘requests’ to my server application. All

  • 0

Customers from around the world can send certain ‘requests’ to my server application. All these customers are located in many different time zones.

For every request, I need to map the request to an internal C++ class instance. Every class instance has some information about its ‘location’, which is also indicated by a time zone.

Every customer can send requests relating to instances belonging to different time zones. To prevent my customers from converting everything themselves to the time zone of the ‘target’ instance, I have to convert everything myself from one time zone to another. However, I only find in C++ (unmanaged, native) functions to convert times between local time and GTM, but not from/to a time zone that is not your current time zone.

I could ask my customers to send every date time in UTC or GTM, but that does not solve my problem as I still have to convert this to the time zone of the ‘instance’, which can be any time zone in the world.

I also don’t seem to find a Windows function that does this. What I do find is a managed .Net class that does this, but I want to keep my application strictly unmanaged.

Are there any Windows (XP, Vista, 7, 2003, 2008) functions that I can use (and which I overlooked in the documentation), or are there any other free algorithms that can convert between one time zone and the other?

Notice that it is not the GMT-difference that is posing the problem, but the actual DST-transition moment that seems to depend on the time zone. E.g:

  • Western Europe goes from non-DST to DST the last Sunday before April 1st.
  • USA goes from non-DST to DST the 2nd Sunday after March 1st.
  • China has no DST.
  • Australia goes from non-DST to DST the 1st Sunday after October 1st.

All this DST-transition information is available somewhere in the Windows registry. Problem is: which Windows function can I use to exploit this information.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:49:48+00:00Added an answer on May 15, 2026 at 6:49 pm

    I don’t know of a way to extract information about other TimeZones via the API: I’ve seen it done by querying the registry though (we do this in a WindowsCE-based product).

    The TimeZones are defined as registry keys under

    HKLM\Software\Microsoft\Windows NT\Current Version\Time Zones
    

    Each key contains several values, and the one which tells you about offsets & Daylight Savings is the TZI key. This is a binary blob, and it represents this structure:

    typedef struct
    {
        LONG m_nBias;
        LONG m_nStandardBias;
        LONG m_nDaylightBias;
        SYSTEMTIME m_stcStandardDate;
        SYSTEMTIME m_stcDaylightDate;
    } TZI;
    

    Look up MSDN’s TIME_ZONE_INFORMATION page (http://msdn.microsoft.com/en-us/library/ms725481(v=VS.85).aspx) for how to interpret the Bias fields, and especially the StandardDate and DaylightDate fields — they are gently abused to support constructs like “the last Saturday in April”.

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can not get logs from some customers, can I use Google Urchin in
I am importing customers from Amazon to do an integration with our ordering system
I have multiple web applications (PHP) which are being served to different customers from
I'm looking for something like this: SELECT german_subsidiaries.*, customers.* FROM german_subsidiaries INNER JOIN customers
here is the query SELECT * FROM customers WHERE NOT EXISTS ( SELECT 1
I have an SQL statement: SELECT * FROM customers WHERE BINARY login='xxx' AND password='yyyy'
We have a web portal product from which we customize portals from customers. We
We have a request from many customers to make our datepickers reflect the date
I want to grab my customers phone number from a MYSQL database and auto
I am using the following for my customers to unsubscribe from my mailing list;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.