Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / August 2007

Tip: Looking for answers? Try searching our database.

How to change Date, independ from Winter and Summer ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Benjamin - 27 Aug 2007 10:51 GMT
Hi,

the user can change the time, in my program. I use:

<DllImport("coredll.dll")> _
   Public Shared Function SetLocalTime(ByRef lpSystemTime As
SYSTEMTIME) As Int32
   End Function

In the winter works fine, but in summer there a difference from 1
hour. How can i workaround the mistake? I dont want to look if we got
winter or summer. I only want to set the time, independen from the
date. And this the whole year.

Please Help!

thanks, Benjamin
Peter Foot [MVP] - 27 Aug 2007 14:51 GMT
SetLocalTime sets the time with the timezone / daylight savings applied. Use
SetSystemTime to set a UTC time without these adjustments. If you only want
to change the date read the current value from GetSystemTime first, then
just modify the fields to reflect the user specified date and call
SetSystemTime.

Peter

Signature

Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility

> Hi,
>
[quoted text clipped - 13 lines]
>
> thanks, Benjamin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.