how to use nsdateformatter to Venezuela

后端 未结 2 482
后悔当初
后悔当初 2020-12-04 04:32

I\'m trying to schedule a date on the calendar, which has a start time and an end time, everything works fine if the time zone is in the U.S., and the date the change does n

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 04:36

    Simply change one line of code in your code...

    [dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]];
    

    This will set time format in universal which doesnot change with region or day light saving time.

提交回复
热议问题