2
votes
Vote UpVote

Fix: Now() returns incorrect time on iOS device

The Hacker's Corner – var TZOffsetFromGMT : Integer; procedure TForm1.FormCreate(Sender: TObject); begin TZOffsetFromGMT := NSTimeZone.localTimeZone.secondsFromGMT; end; use it later as follows: var Hour, Min, Sec, MSec : Word; CurrTime : TDateTime; begin CurrTime := Now+TZOffsetFromGMT/3600.0/24.0; DecodeTime(CurrTime,Hour,Min,Sec,MSec); … end; Share This | Email this page to a friend
Favorite? Off-Topic? Anders Ohlsson @ 2011-10-21 01:56

Statistics

Visits: 394
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

stukelly
vcldeveloper
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)