-
-
Save ethanbing/28848417e3121036af8d to your computer and use it in GitHub Desktop.
调整8小时差
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSDate *date = [NSDate date]; | |
// 调整8小时时差 | |
NSTimeZone *zone = [NSTimeZone systemTimeZone]; | |
NSInteger interval = [zone secondsFromGMTForDate:date]; | |
NSDate *localeDate = [date dateByAddingTimeInterval: interval]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment