Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with NSDate time zone #78

Open
Piero87 opened this issue Jan 3, 2013 · 1 comment
Open

Problem with NSDate time zone #78

Piero87 opened this issue Jan 3, 2013 · 1 comment

Comments

@Piero87
Copy link

Piero87 commented Jan 3, 2013

Hello, i have a problem with the NSDate display in the GridView, i save the date with the GMT timezone, i'm in italy and the date is displayed correctly in the calendar, but with the time zone of New York for example the date is displayed one day before, for example i save a date the 03-01-2013, and in italy i can see it in the right KalView, instead with the time zone of new york i can see the date on the 02-01-2013 in the grid kal view, so one day before, so my question is there is a way to set the time zone to GMT for example for the Kal?

@poom3d
Copy link

poom3d commented Jan 8, 2013

This can be achieved by using NSDateFormatter. Here is an example.
NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setTimeZone:[NSTimeZone timeZoneWithName:@"AKDT"]];

Replace AKDT with timezone of your choice. (New York would be EST IMHO)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants