iphone - Date object is showing date with minus 5:30hr when compare to current time. -


this question has answer here:

when create object nsdate , put cursor on object showing currect date belowenter image description here

and when trying log object showing date minus 5:30hr below
enter image description here

and when add offset date , put cursor on object showing date plus 5:30hr below

nsinteger offset = [[nstimezone defaulttimezone] secondsfromgmt]; 

enter image description here

and when trying log object showing exact date below

enter image description here

why happening this? problem timezone? in advance.

nsdate comes gmt. have format date per required timezone.. can set device timezone or can use calendar set timezone..


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -