Re: datetime conversions - US CST
From: Mark (marfi95_at_yahoo.com)
Date: 08/25/04
- Next message: One Handed Man \( OHM - Terry Burns \): "Re: which is faster convert or directcast"
- Previous message: Gary Dunne: "Re: C# / VB .Net language incompatibilities"
- In reply to: Jay B. Harlow [MVP - Outlook]: "Re: datetime conversions - US CST"
- Next in thread: Jay B. Harlow [MVP - Outlook]: "Re: datetime conversions - US CST"
- Reply: Jay B. Harlow [MVP - Outlook]: "Re: datetime conversions - US CST"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: One Handed Man \( OHM - Terry Burns \): "Re: which is faster convert or directcast"
- Previous message: Gary Dunne: "Re: C# / VB .Net language incompatibilities"
- In reply to: Jay B. Harlow [MVP - Outlook]: "Re: datetime conversions - US CST"
- Next in thread: Jay B. Harlow [MVP - Outlook]: "Re: datetime conversions - US CST"
- Reply: Jay B. Harlow [MVP - Outlook]: "Re: datetime conversions - US CST"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|