4
A
回答
5
從「男人本地時間」:
The gmtime() function converts the calendar time timep to broken-down
time representation, expressed in Coordinated Universal Time (UTC). It
may return NULL when the year does not fit into an integer. The return
value points to a statically allocated struct which might be overwrit‐
ten by subsequent calls to any of the date and time functions. The
gmtime_r() function does the same, but stores the data in a user-sup‐
plied struct.
The localtime() function converts the calendar time timep to broken-
time representation, expressed relative to the user’s specified time‐
zone. The function acts as if it called tzset(3) and sets the external
variables tzname with information about the current timezone, timezone
with the difference between Coordinated Universal Time (UTC) and local
standard time in seconds, and daylight to a non-zero value if daylight
savings time rules apply during some part of the year. The return
value points to a statically allocated struct which might be overwrit‐
ten by subsequent calls to any of the date and time functions. The
localtime_r() function does the same, but stores the data in a user-
supplied struct. It need not set tzname, timezone, and daylight.
+0
感謝您的回答=) – alwinlin 2011-03-23 22:03:57
6
gmtime的是協調世界時(UTC),而本地時間是在你的時區
相關問題
- 1. ++和:haskell之間的區別是什麼?
- 2. $(())和expr之間的區別是什麼?
- 3. $(...)和`...`之間的區別是什麼
- 4. [undefined]和[,]之間的區別是什麼?
- 5. C++中的Pause(),Sleep()和Wait()之間的區別是什麼?
- 6. C#中System.Type和System.RuntimeType之間的區別是什麼?
- 7. C中「Real Types」和「Arithmetic Types」之間的區別是什麼?
- 8. C#中Console.Write(「H」)和Console.Write('H')之間的區別是什麼?
- 9. C++中object和object()之間的區別是什麼
- 10. C++中stdlib.h和cstdlib之間的主要區別是什麼?
- 11. C#中myArray.GetValue(2)和myArray [2]之間的區別是什麼?
- 12. - >和>之間的區別是什麼。在C/C++?
- 13. Symbian C++和規範C++之間的語法區別是什麼?
- 14. 爲什麼gmtime和localtime給我同樣的結果?
- 15. 區別:%% a和%variable%變量之間的區別是什麼?
- 16. java的sleep()和c的sleep()之間的區別是什麼?
- 17. C#:TypeDescriptor.GetAttributes()和GetType().GetCustomAttributes之間的區別是什麼?
- 18. '(a b c)和(list'a'b'c)之間的區別是什麼?
- 19. repr(C)和repr(rust)之間的區別是什麼?
- 20. 「;」和「;」之間的區別是什麼?和T-SQL中的「GO」?
- 21. MVC和MVVM之間的區別和相似之處是什麼?
- 22. TVF/UDF之間的區別是什麼
- 23. [EmailPasswordAuthProvider,EmailAuthProvider]之間的區別是什麼
- 24. C++中的位向量和位集之間有什麼區別?
- 25. C#中的對象和類之間有什麼區別?
- 26. mootools中的.innerHTML和.set('html','')之間的區別是什麼?
- 27. R的read.table中''和''之間的區別是什麼?
- 28. OOP中的 - >和::之間的區別是什麼
- 29. java中的Array和Hashmap之間的主要區別是什麼?
- 30. .Net 3.5中的Microsoft.Web.Management和System.DirectoryServices之間的區別是什麼?
你明白一個時區是什麼? – 2011-03-23 17:15:20
當我不得不面對全球時代時,我喜歡[時間和日期* dot * com](http://timeanddate.com/)。 – pmg 2011-03-23 18:12:46