{"id":856,"date":"2015-04-10T15:30:56","date_gmt":"2015-04-10T06:30:56","guid":{"rendered":"https:\/\/blog.ymyzk.com\/?p=856"},"modified":"2018-12-18T01:30:35","modified_gmt":"2018-12-17T16:30:35","slug":"python-datetime-unix-time","status":"publish","type":"post","link":"https:\/\/blog.ymyzk.com\/2015\/04\/python-datetime-unix-time\/","title":{"rendered":"Python \u306e datetime \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068 Unix \u6642\u9593\u306e\u76f8\u4e92\u5909\u63db\u65b9\u6cd5\u306e\u307e\u3068\u3081"},"content":{"rendered":"
Python \u306e datetime \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068 Unix \u6642\u9593 (Unix time \/ Epoch time) \u3092\u76f8\u4e92\u5909\u63db\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059. Python \u306e datetime \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306f\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u60c5\u5831\u304c\u4ed8\u3044\u3066\u3044\u308b\u3082\u306e (aware) \u3068\u4ed8\u3044\u3066\u3044\u306a\u3044\u3082\u306e (naive) \u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059.
\n<\/p>\n
Unix \u6642\u9593 (Unix time) \u306f UTC<\/strong> \u3067\u306e 1970\/1\/1 00:00:00 \u304b\u3089\u306e\u7d4c\u904e\u79d2\u6570\u3067\u8868\u3055\u308c\u307e\u3059. \u591a\u304f\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u958f\u79d2\u306e\u5b58\u5728\u3092\u8003\u616e\u3057\u306a\u3044\u5b9f\u88c5\u3068\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3067, \u3053\u306e\u5834\u5408 Unix time \u3068 UTC, JST \u306e\u5bfe\u5fdc\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059.<\/p>\n