0

Possible Duplicate:
NSDate not returning correct date

I am developing a iPad app. I need to log the time events happen but NSDate is returning the time a hour short

Has anyone else come across this? anyone know why this is happening?

N.B the system time is correct

Community
  • 1
  • 1
geminiCoder
  • 2,918
  • 2
  • 29
  • 50
  • 1
    Show us your code. We are not psychic. btw NSDate always works in GMT. – JeremyP Oct 19 '11 at 10:50
  • 2
    Logging NSDate returns the time in GMT. NSDate holds the time in GMT. This has been covered extensively here. See http://stackoverflow.com/questions/1081647/how-to-convert-time-to-the-timezone-of-the-iphone-device/1082179#1082179 – jrturton Oct 19 '11 at 10:50
  • Firstly I am in england there for work in GMT. Secondly even the simplest NSLog(@"%@", [NSDate date]); returns the time an hour out. even though the system time is correct. this works on both simulator and iPad – geminiCoder Oct 20 '11 at 09:17

0 Answers0