weilsonwonder / WWCalendarTimeSelector

A android inspired iOS date/time picker
MIT License
317 stars 126 forks source link

Selected time is always four hours ahead #6

Closed lancevalour closed 8 years ago

lancevalour commented 8 years ago

Hi,

So I always get the wrong time after I click the Done button.

func WWCalendarTimeSelectorDone(selector: WWCalendarTimeSelector, date: NSDate) {
        print(date)
 }

Printed out time is always four hours ahead. I'm not sure what is going on here...

Thanks, Yicheng

dev4dev commented 8 years ago

try to use DateFormatter for printing date string, sometimes console could print date in wrong timeZone or something like that

lancevalour commented 8 years ago

Thank you for your help. I think this can be closed.

commando24 commented 7 years ago

Actually console always print date in UTC. may be thats why date is not printed as expected.

akmalshukri commented 6 years ago

how to solve it ? i also got the same issue .. not correct time when selected ..