Re: datetime conversions - US CST

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mark (marfi95_at_yahoo.com)
Date: 08/25/04


Date: 25 Aug 2004 06:50:36 -0700

Thanks Jay.

Unfortunately, in this environment, the server that I referred to is
not the end location and is not in CST. For this particular txn, its
just passing thru the message on to the final dest. So the server
would have the same problem. I haven't looked yet, but does the
localtime include the timezone locally also, so I would have that
information ?

"Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP@msn.com> wrote in message news:<uGllUVliEHA.3536@TK2MSFTNGP12.phx.gbl>...
> Mark,
> Unfortunately System.DateTime (VB's Date) only knows how to convert a
> Universal Time to Local Time & convert Local Time to UniversalTime.
>
> I would recommend that each of your machines convert local time to universal
> time, then send that time to the server. The server can then convert the
> universal time to local time which will be CST.
>
> You can use
> - DateTime.Now - to get current local date & time
> - DateTime.UtcNow - to get current date & time in universal time (UTC)
> - DateTime.ToUniversalTime - to convert local time to universal time
> - DateTime.ToLocalTime - to convert universal time to local time
>
>
> Hope this helps
> Jay
>
> "Mark" <marfi95@yahoo.com> wrote in message
> news:f47c17d0.0408241507.65f44958@posting.google.com...
> > Hey everybody.
> >
> > Is there an easy way in vb.net to convert the local time of a machine
> > to US CST ? My machines are distributed throughout and the server is
> > requesting we send the time of the txns in US CST.
> >
> > TIA,
> > Mark



Relevant Pages

  • Re: getutcdate() issues
    ... If your server has incorrect local time, ... I still fail to understand why this is the database engine's fault. ... them with the correct system clock. ...
    (microsoft.public.sqlserver.programming)
  • Re: deleting cookies and local browser time versus server time
    ... Is there a way to get the local time from the user's browser? ... Well, considering you're asking the $_SERVER for a local user variable, ... set the cookie back appropriately. ...
    (comp.lang.php)
  • Re: Day Light Savings time changes on March 11
    ... An ISP starts out with one mail server and a management server, they create tools that automate and report on the system. ... It is all in local time. ... We will convert them, but it takes and plan, and a reason. ... logo change for Memorial Day. ...
    (freebsd-questions)
  • Re: Date problem
    ... the server is reporting that it's 7/27/09. ... javascript is the only way. ... browser, then he could set up a javascript program to automatically ... report back to the server what the local time at the browser is - ...
    (comp.lang.php)
  • Re: Paris: hottest day of the year
    ... +0200 is the offset of your local time from GMT/Universal Time in hhmm ... Though "-0000" also indicates Universal Time, ... Server and select a server ... "Passa automaticamente all'ora legale" is now checked. ...
    (rec.travel.europe)