Re: TimeZone conversion and utils on PPC
- From: PB <PB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 22 May 2007 11:20:00 -0700
Thanks for the response Chris. But, that is my problem, right? How do I get
TimeZone info for a non-local TimeZone? The whole point of PInvoking on the
desktop was to get this information using a WindowsTimeZoneId, and then get
the offset to convert LocalTime to that time zone. How do you do that in .NET
CF 2.0?
TimeZone class offers only one static property "CurrentTimeZone", and I am
looking for something similar to GetTimeZoneById(int windowsTimeZoneId) or
GetTimeZoneByName(string timeZoneStandardName).
Am I missing something here? If not, does OpenNetCF offer something in this
area?
Thanks!
"<ctacke/>" wrote:
You can get the timezone info for your "desired" zone and your local zone,.
then use the difference between offsets associated with each to adjust what
SystemTimeToLocalTime gives you.
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com
"PB" <PB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0FD7A4E7-5D28-488D-B8DC-F7A20D8A06A4@xxxxxxxxxxxxxxxx
oops - I missed mentioning our motivation to do that manual conversion in
my
initial post:
The only difference is that you can't do the
conversion for an arbitrary time zone; it has to be the currently-set
one.
Precisely that is what we want to accomplish. Convert to and from an
arbitrary time zone (not Local time zone).
Any ideas? I appreciate your response.
Thanks
PB.
"Paul G. Tobey [eMVP]" wrote:
SystemTimeToLocalTime and LocalTimeToSystemTime are both available.
Since
local time always takes into account the current time zone, state of the
DST
flag, etc., they should do what you want. I've never seen the functions
that you mention there. The only difference is that you can't do the
conversion for an arbitrary time zone; it has to be the currently-set
one.
Paul T.
"PB" <PB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C6E4F7D8-0780-4131-8711-8C3B2CEEAEA6@xxxxxxxxxxxxxxxx
Hi
We use PInvoke on "Kernel32.dll" to do some TimeZone conversion,
Daylight
savings helpers, etc on our desktop applications.
I found out that there are no equivalent functions for these on PPC in
"CoreDll.dll". Is there any implementation of any of the following
functions
on PPC?
- SystemTimeToTzSpecificLocalTime
- TzSpecificLocalTimeToSystemTime
Or are there any PPC alternatives for converting Times to and from UTC
and
Local including taking into account any Daylight offsets?
TIA
Partha.
- Follow-Ups:
- Re: TimeZone conversion and utils on PPC
- From: Paul G. Tobey [eMVP]
- Re: TimeZone conversion and utils on PPC
- References:
- Re: TimeZone conversion and utils on PPC
- From: Paul G. Tobey [eMVP]
- Re: TimeZone conversion and utils on PPC
- From: <ctacke/>
- Re: TimeZone conversion and utils on PPC
- Prev by Date: Re: TimeZone conversion and utils on PPC
- Next by Date: Re: TimeZone conversion and utils on PPC
- Previous by thread: Re: TimeZone conversion and utils on PPC
- Next by thread: Re: TimeZone conversion and utils on PPC
- Index(es):
Relevant Pages
|