Re: TimeZone conversion and utils on PPC

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.






.



Relevant Pages

  • Re: Date problem
    ... even what a time zone is. ... time zone of the client, ... As far as I am aware, the browser does not notify the server what ... locale they are in, nor, specifically, what timezone. ...
    (comp.lang.php)
  • Re: How do I convert a DateTime to another time zone?
    ... Does the .NET Framework support Time Zone conversions to any given Time ... The .NET Framework does support conversion to and from UTC and the systems ... People are often surprised why this feature cannot be supplied by Microsoft ...
    (microsoft.public.dotnet.framework)
  • Re: optional timezones Re: (encode-universal-time) with fractional timezone offsets?
    ... Time zone values increase with motion to the ... the timezone: for example: ... (decode-universal-time utime NIL) is not portable ... think there is any cute solution for &optionals which suffer this ...
    (comp.lang.lisp)
  • Re: Time zone problem moving from JDK 1.4 to 1.5
    ... > On HP-UX, we've always used 'MST7' for our timezone, and we've had no ... > Or was 'MST7' always wrong, and it just now decided to bite us? ... Take the following with a gain of salt, because time zone abbreviations ... specifications. ...
    (comp.lang.java.programmer)
  • Re: What is ZIC ??
    ... > timeZone Info Compiler. ... Use the given time zone as local time. ... an abbreviation) means the minimum year representable as an integer. ... Gives the amount of time to be added to local standard time when the ...
    (comp.os.vms)