Solved

vb.net + convert time from MST to GMTzone

Posted on 2007-11-21
3
1,196 Views
Last Modified: 2008-02-01
I have  aserver which is configured to save the MST. I need to convert the now() from the MST to GMT in my code. This should work all year around even for Daylight savings plan.

How would I do this?

YRKS
0
Comment
Question by:YRKS
[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
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 500 total points
ID: 20331951
timevar.ToUniversal()
0
 

Author Comment

by:YRKS
ID: 20332016
Yes I think that's exactly what I was looking for. This would take care of the daylight savings plan right. I am  just supposed to save the current date and time as GMT time when I create a new record.
YRKS
0
 
LVL 22

Expert Comment

by:cookre
ID: 20332195
Yes.  Now() is associated local time, and the state of local DST is known and taken into account.

Unless one KNOWS that no times or dates other than local will ever be used, prudence dictates that ALL date/times be stored as Universal., then converted to local (or whatever) only on output.

0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Starting up a Project

707 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