{"id":14689,"date":"2021-10-10T11:16:27","date_gmt":"2021-10-10T02:16:27","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=14689"},"modified":"2023-05-28T08:43:38","modified_gmt":"2023-05-27T23:43:38","slug":"%e3%80%90%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0%e3%80%91%e3%80%8c%e6%97%a5%e6%99%82%e3%80%8d%e3%81%ab%e9%96%a2%e3%81%99%e3%82%8b%e7%9f%a5%e8%ad%98","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=14689","title":{"rendered":"\u3010\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3011\u300c\u65e5\u6642\u300d\u306b\u95a2\u3059\u308b\u77e5\u8b58"},"content":{"rendered":"<h2>ISO8601\u5f62\u5f0f<\/h2>\n<p>\u65e5\u4ed8\u3001\u6642\u9593\u3001\u6642\u523b\u3001\u6642\u5dee\u306a\u3069\u3092\u8868\u73fe\u3059\u308b\u305f\u3081\u306e\u56fd\u969b\u6a19\u6e96\u5316\u6a5f\u69cb\uff08ISO\uff09\u306b\u3088\u308b\u898f\u683c\u30671988\u5e74\u306b\u516c\u958b\u3055\u308c\u307e\u3057\u305f\u3002\u4e16\u754c\u4e2d\u306e\u591a\u304f\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u63a1\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">yyyy-MM-ddThh:mm:ssZ<\/pre>\n<p>\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u542b\u307f\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u65e5\u4ed8: 2023-03-24<\/li>\n<li>\u6642\u523b: 15:30:00<\/li>\n<li>\u30bf\u30a4\u30e0\u30be\u30fc\u30f3: +09:00(JST)\u3001Z\u3067\u3042\u308c\u3070UTC(\u5354\u5b9a\u4e16\u754c\u6642)\u3092\u6307\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<h3>JavaScript\u3067\u6271\u3046\u306b\u306f<\/h3>\n<pre class=\"lang:default decode:true\">new Date().toISOString()<\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u65e5\u6642\u3092UTC\u3067\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">2023-03-24T05:26:50.069Z<\/pre>\n<h2 class=\"p1\">\u30bf\u30a4\u30e0\u30be\u30fc\u30f3<\/h2>\n<p class=\"p2\">\u540c\u3058\u6a19\u6e96\u6642\u3092\u5229\u7528\u3059\u308b\u5730\u57df\u3084\u3001\u533a\u5206\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<h3>\u6a19\u6e96\u6642\u3068\u306f\uff1f<\/h3>\n<p>\u30a4\u30ae\u30ea\u30b9\u306e\u30b0\u30ea\u30cb\u30c3\u30b8\u5929\u6587\u53f0\u3092\u57fa\u6e96\u3068\u3057\u3066\u3001\u305d\u306e\u5dee\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<table>\n<tbody>\n<tr>\n<th>\u6a19\u6e96\u6642<\/th>\n<th>\u6642\u5dee<\/th>\n<\/tr>\n<tr>\n<td>\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642(GMT)<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>\u65e5\u672c\u6a19\u6e96\u6642(JST)<\/td>\n<td>+9\u6642\u9593<\/td>\n<\/tr>\n<tr>\n<td>\u53f0\u6e7e\u6a19\u6e96\u6642<\/td>\n<td>+8\u6642\u9593<\/td>\n<\/tr>\n<tr>\n<td>\u4e2d\u56fd\u6a19\u6e96\u6642\uff08\u9999\u6e2f\u3001\u30de\u30ab\u30aa\u3092\u542b\u3080\uff09<\/td>\n<td>+8\u6642\u9593<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 class=\"p1\">UTC\u3001GMT<\/h3>\n<p class=\"p1\">-\u4e21\u8005\u306f\u3001\u76ee\u7684\u3082\u6982\u5ff5\u3082\u7b97\u51fa\u65b9\u6cd5\u3082\u307e\u3063\u305f\u304f\u7570\u306a\u308a\u307e\u3059\u304c\u3001\u65e5\u5e38\u751f\u6d3b\u306b\u4e0d\u90fd\u5408\u306e\u306a\u3044\u7cbe\u5ea6\u306e\u6642\u9593\u6e2c\u5b9a(\u6574\u6570\u306e\u79d2)\u3067\u3042\u308c\u3070\u3001\u307b\u307c\u5dee\u304c\u306a\u3044\u3068\u8003\u3048\u3066\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p class=\"p1\">-\u305f\u3060\u3001\u73fe\u5728\u306e\u4e3b\u6d41\u306f\u3088\u308a\u6b63\u78ba\u306a\u6642\u523b\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u300cGMT\u300d\u3067\u306f\u306a\u304f\u3001\u300cUTC\u300d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4 class=\"p1\">UTC(Coordinated Universal Time\u3001\u5354\u5b9a\u4e16\u754c\u6642)<\/h4>\n<p class=\"p1\">-\u73fe\u5728\u306f\u3053\u308c\u3002<\/p>\n<p class=\"p1\">-\u539f\u5b50\u6642\u8a08\u3068\u7cbe\u5bc6\u306a\u5929\u4f53\u89b3\u6e2c\u306b\u57fa\u3065\u304f\u306f\u308b\u304b\u306b\u7cbe\u5ea6\u306e\u9ad8\u3044\u6642\u9593<\/p>\n<p class=\"p1\">-\u300c<b>\u00a0<\/b><i>date<\/i>.toUTCString()\u300d\u3067\u53d6\u5f97\u3067\u304d\u308b\u3002<\/p>\n<h4 class=\"p1\">GMT(\u30b0\u30ea\u30cb\u30c3\u30b8\u6a19\u6e96\u6642\uff09<\/h4>\n<p class=\"p1\">-\u6614\u306f\u4f7f\u308f\u308c\u3066\u3044\u305f\u3002<\/p>\n<p class=\"p1\">-\u30ed\u30f3\u30c9\u30f3\u306e\u30b0\u30ea\u30cb\u30c3\u30b8\u5929\u6587\u53f0\u3092\u7d4c\u5ea60\u5ea6\u3068\u5b9a\u3081\u3001\u592a\u967d\u306e\u5357\u4e2d\u6642\u523b\u3092\u5348\u5f8c0\u6642\u3068\u5b9a\u3081\u305f\u4eee\u60f3\u7684\u306a\u6642\u9593<\/p>\n<p class=\"p1\">-\u306a\u304a\u3001\u300c<i>date<\/i><b>.<\/b>toGMTString()\u300d\u306f\u975e\u63a8\u5968\u3002<\/p>\n<h2 class=\"p1\">\u30ed\u30b1\u30fc\u30eb<\/h2>\n<p class=\"p1\">-linux\u3067\u306f\u300clocale\u300d\u30b3\u30de\u30f3\u30c9\u3067\u73fe\u5728\u306e\u30ed\u30b1\u30fc\u30eb\u3092\u78ba\u8a8d\u3067\u304d\u308b\u3002<\/p>\n<p class=\"p1\">-\u30b7\u30b9\u30c6\u30e0\u3084\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306b\u304a\u3051\u308b\u8a00\u8a9e\u3084\u56fd\u30fb\u5730\u57df\u306e\u8a2d\u5b9a\u306e\u3053\u3068<\/p>\n<p class=\"p1\">-\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c82\u6587\u5b57\u306e\u56fd\u30b3\u30fc\u30c9\uff08ISO 3166\uff09\u3068\u8a00\u8a9e\u30b3\u30fc\u30c9\uff08ISO 639\uff09\u3092\u7528\u3044\u3066\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u3002\u4f8b\u3048\u3070\u3001\u65e5\u672c\u56fd\u306f\u300cjp\u300d\u3001\u65e5\u672c\u8a9e\u306f\u300cja\u300d\u3001\u30a4\u30ae\u30ea\u30b9\u306f\u300cgb\u300d\u3001\u30a2\u30e1\u30ea\u30ab\u306f\u300cus\u300d\u3001\u82f1\u8a9e\u306f\u300cen\u300d\u3067\u3042\u308b\u3002<\/p>\n<p class=\"p1\">-\u300cja-jp\u300d\u306e\u3088\u3046\u306b\u4e21\u8005\u3092\u9023\u306d\u3066\u8a18\u8ff0\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308a\u3001\u300cen-us\u300d\u3068\u300cen-gb\u300d<\/p>\n<ul>\n<li>JavaScript\u3067\u306f\u300cDate.toLocaleString\u300d\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<h3 class=\"p1\">UNIX\u6642\u9593\u3001UNIX\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3001\u30a8\u30dd\u30c3\u30af\u79d2<\/h3>\n<p class=\"p1\">-UNIX\u7cfbOS\u3067\u6a19\u6e96\u7684\u306b\u7528\u3044\u3089\u308c\u3066\u3044\u308b\u6642\u9593\u306e\u8868\u73fe\u65b9\u6cd5<\/p>\n<p class=\"p1\">-\u300c1970\u5e741\u67081\u65e5\u5348\u524d0\u66420\u52060\u79d2\uff08UTC\uff09\u300d\u304b\u3089\u306e\u7d4c\u904e\u79d2\u6570\u3067\u8868\u73fe\u3059\u308b<\/p>\n<p class=\"p1\">-C\u8a00\u8a9e\u306e\u300ctime_t\u578b\u300d\u306b\u3088\u308b2038\u5e74\u554f\u984c\u304c\u3042\u308b\u3002<\/p>\n<p class=\"p1\">-JavaScript\u306eDate \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u00a01970 \u5e74 1 \u6708 1 \u65e5 (UTC)\u00a0\u304b\u3089\u306e\u7d4c\u904e\u30df\u30ea\u79d2\u6570\u3092 Number\u578b \u3067\u4fdd\u6301\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p class=\"p1\"><span class=\"Apple-converted-space\">\u00a0 <\/span>\u4f8b:\u00a02021-07-09T15:00:00.000Z<\/p>\n<h2 class=\"p1\">\u6642\u9593\u8a2d\u8a08<\/h2>\n<p class=\"p1\">-\u672c\u756a\u74b0\u5883\u3068\u306e\u517c\u306d\u5408\u3044\u306b\u3064\u3044\u3066\u3002<\/p>\n<h3 class=\"p1\">\u30d0\u30c3\u30af\u30a8\u30f3\u30c9<\/h3>\n<p class=\"p1\">-\u57fa\u672c\u7684\u306b\u30b5\u30fc\u30d0\u30fc\u306e\u6642\u523b<\/p>\n<p class=\"p1\">-\u8907\u6570\u53f0\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f1\u7b87\u6240\u3067\u53d6\u5f97\u3059\u308b\u69cb\u6210\u306b\u3057\u305f\u65b9\u304c\u826f\u3044\u3002<\/p>\n<h3 class=\"p1\">\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9<\/h3>\n<p class=\"p1\">-\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u306e\u65e5\u4ed8\u8a2d\u5b9a\u3084\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u306b\u3088\u3063\u3066\u6c7a\u307e\u308b\u3002<\/p>\n<p class=\"p4\"><span class=\"s1\">-<\/span>\u30b5\u30fc\u30d0\u30fc\u6642\u9593\u3092\u53d6\u5f97\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3082\u3067\u304d\u308b\u3002<\/p>\n<h2>Rails\u3067\u306e\u30bf\u30a4\u30e0\u30be\u30fc\u30f3<\/h2>\n<h3>ActiveSupport::TimeWithZone\u30af\u30e9\u30b9<\/h3>\n<p>Rails\u3067\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u6271\u3046\u5834\u5408\u306fTime\u306e\u4ee3\u308f\u308a\u306b<span style=\"color: #ff0000;\"><strong>ActiveSupport::TimeWithZone<\/strong><\/span>\u30af\u30e9\u30b9\u3092\u4f7f\u3044\u307e\u3059\u3002\u3080\u3057\u308dRails\u304c\u65e5\u6642\u578b\u3092DB\u304b\u3089\u8aad\u307f\u8fbc\u3080\u5834\u5408\u306f\u81ea\u52d5\u7684\u306b\u3053\u306e\u30af\u30e9\u30b9\u304c\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n<h3>config\/application.rb<\/h3>\n<p>\u4e0b\u8a18\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u5f62\u3067\u3042\u308c\u3070Rails\u30a2\u30d7\u30ea\u5168\u4f53\u306e\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u8a2d\u5b9a\u3092\u4fee\u6b63\u3067\u304d\u307e\u3059\u3002\u306a\u304a\u3001\u8a2d\u5b9a\u5f8c\u306fRails\u30b5\u30fc\u30d0\u3092\u518d\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">module App\r\n  class Application &lt; Rails::Application\r\n    # Settings in config\/environments\/* take precedence over those specified here.\r\n    # Application configuration should go into files in config\/initializers\r\n    # -- all .rb files in that directory are automatically loaded.\r\n    config.time_zone = 'Tokyo' \u2605\u8ffd\u52a0\r\n  end\r\nend<\/pre>\n<h4>\u5b9f\u969b\u306e\u8a2d\u8a08<\/h4>\n<p>\u300cTokyo\u300d\u306a\u3069\u306f\u74b0\u5883\u56fa\u6709\u306e\u60c5\u5831\u306a\u306e\u3067\u3001Rails\u306eDockerfile\u306a\u3069\u306b\u56fa\u5b9a\u5024\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u304a\u3044\u3066\u8aad\u307f\u8fbc\u307e\u305b\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h4>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u8aad\u307f\u66f8\u304d\u3059\u308b\u30bf\u30a4\u30e0\u30be\u30fc\u30f3<\/h4>\n<pre class=\"lang:default decode:true\">module App\r\n  class Application &lt; Rails::Application\r\n    # Initialize configuration defaults for originally generated Rails version.\r\n    config.load_defaults 6.1\r\n\r\n    # Configuration for the application, engines, and railties goes here.\r\n    #\r\n    # These settings can be overridden in specific environments using the files\r\n    # in config\/environments, which are processed later.\r\n    #\r\n    config.time_zone = ENV[\"TZ\"]\r\n    # config.eager_load_paths &lt;&lt; Rails.root.join(\"extras\")\r\n\r\n    # \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8aad\u307f\u66f8\u304d\u306b\u4f7f\u7528\u3059\u308b\u30bf\u30a4\u30e0\u30be\u30fc\u30f3(:local | :utc(default))\r\n    config.active_record.default_timezone = :utc\u3000\u2605\u8ffd\u52a0\r\n\r\n    # Only loads a smaller set of middleware suitable for API only apps.\r\n    # Middleware like session, flash, cookies can be added back manually.\r\n    # Skip views, helpers and assets when generating a new resource.\r\n    config.api_only = true\r\n  end\r\nend<\/pre>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u306futc\u3067\u4e16\u754c\u6a19\u6e96\u6642\u306b\u306a\u308a\u307e\u3059\u3002\u300c:local\u300d\u3068\u6307\u5b9a\u3059\u308b\u3068\u3001\u300cconfig.time_zone\u300d\u3067\u6307\u5b9a\u3057\u305f\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u306e\u6642\u9593\u306b\u306a\u308a\u307e\u3059\u3002PostgreSQL\u306a\u3069\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067UTC\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u57fa\u672c\u7684\u306b\u306f\u300cUTC\u300d\u3067\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002\uff08\u51fa\u306a\u3044\u3068\u8aad\u307f\u8fbc\u307f\u3068\u66f8\u304d\u8fbc\u307f\u306b\u305a\u308c\u304c\u767a\u751f\u3057\u3066\u6642\u9593\u306b\u30ba\u30ec\u304c\u767a\u751f\u3057\u307e\u3059\u3002\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"ISO8601\u5f62\u5f0f \u65e5\u4ed8\u3001\u6642\u9593\u3001\u6642\u523b\u3001\u6642\u5dee\u306a\u3069\u3092\u8868\u73fe\u3059\u308b\u305f\u3081\u306e\u56fd\u969b\u6a19\u6e96\u5316\u6a5f\u69cb\uff08ISO\uff09\u306b\u3088\u308b\u898f\u683c\u30671988\u5e74\u306b\u516c\u958b\u3055\u308c\u307e\u3057\u305f\u3002\u4e16\u754c\u4e2d\u306e\u591a\u304f\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u63a1\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 yyyy-MM-ddThh [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/14689"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14689"}],"version-history":[{"count":7,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/14689\/revisions"}],"predecessor-version":[{"id":20786,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/14689\/revisions\/20786"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14689"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}