Solved

vb.net + convert time from MST to GMTzone

Posted on 2007-11-21
3
1,191 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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

737 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