{"id":2805,"date":"2020-05-29T17:40:30","date_gmt":"2020-05-29T16:40:30","guid":{"rendered":"https:\/\/ridgesolutions.ie\/?p=2805"},"modified":"2022-05-18T18:49:11","modified_gmt":"2022-05-18T17:49:11","slug":"mktime-always-uses-local-time-zone-and-converts-from-utc","status":"publish","type":"post","link":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/","title":{"rendered":"mktime() always uses local time zone and converts from UTC"},"content":{"rendered":"<p>If you&#8217;re working with UTC times, you may be upset to find that <strong>mktime()<\/strong> always converts using your local time zone thus wrecking your UTC times.\u00a0 Instead of <strong>mktime()<\/strong> use:<\/p>\n<ul>\n<li>Linux\/Posix: <strong><span class=\"crayon-e\">timegm<\/span>()<\/strong><\/li>\n<li>Windows: <strong>_mkgmtime()<\/strong><\/li>\n<\/ul>\n<p>For example, let&#8217;s use <strong>timegm()<\/strong> to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation at that time, it must be passed a UTC time!\u00a0 See <a href=\"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/01\/14\/c-code-to-estimate-solar-azimuth-and-elevation-given-gps-position-and-time\/\">this post<\/a> if you are interested in SolarAzEl().<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">\/\/\r\n\/\/ Make UTC time for 10:16:00 on 5th. May 2022\r\n\/\/ and use it to calculate the Solar Elevation\r\n\/\/ at the time via SolarAzEl().  SolarAzEl() \r\n\/\/ requires a UTC time!\r\n\/\/\r\n\r\ntm utc;\r\n\r\n\/\/ tm_year is time since 1900\r\nutc.tm_year = 2022 - 1900;\r\n\r\n\/\/ Month is zero based, i.e. Jan is month 0, May is 4\r\nutc.tm_mon = 5 - 1;\r\nutc.tm_mday = 5;\r\nutc.tm_hour = 10;\r\nutc.tm_min = 16;\r\nutc.tm_sec = 00;\r\nutc.tm_isdst = 0;\r\n\r\n\/\/ Get UTC time_t val, do not change for local time offset!\r\ntim = timegm(&amp;utc);\t\/\/ or _mkgmtime() on windows\r\n\r\n\/\/\r\n\/\/ Now calculate Solar Elevation at\r\n\/\/ GPS coordinates 52.975, -6.0494\r\n\/\/ at sea level using the UTC time.\r\n\/\/\r\ndouble altitude = 0;\r\ndouble Az = 0.0;\r\ndouble El = 0.0;\r\n\r\ndouble lat = 52.975;\r\ndouble lon = -6.0494;\r\n\r\nSolarAzEl(tim, lat, lon, 0, &amp;Az, &amp;El);\r\n\r\nprintf(\"Solar Azimuth: %f\\n\", Az);\r\nprintf(\"Solar Elevation: %f\\n\", El);\r\n\r\n\/\/<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times.\u00a0 Instead of mktime() use: Linux\/Posix: timegm() Windows: _mkgmtime() For example, let&#8217;s use timegm() to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[301],"tags":[],"class_list":["post-2805","post","type-post","status-publish","format-standard","hentry","category-by-kevin-godden"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"If you&#039;re working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times. Instead of mktime() use: Linux\/Posix: timegm() Windows: _mkgmtime() For example, let&#039;s use timegm() to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kevin Godden\"\/>\n\t<meta name=\"google-site-verification\" content=\"Kyj52YLp6GOPA44PVBffo9fjW8rgWHYYRF0ZYjfy6ss\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Systems and Embedded Software Engineering, Ireland. | Some thoughts of a busy Computer Engineer\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"mktime() always uses local time zone and converts from UTC\" \/>\n\t\t<meta property=\"og:description\" content=\"If you&#039;re working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times. Instead of mktime() use: Linux\/Posix: timegm() Windows: _mkgmtime() For example, let&#039;s use timegm() to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-05-29T16:40:30+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-05-18T17:49:11+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"mktime() always uses local time zone and converts from UTC\" \/>\n\t\t<meta name=\"twitter:description\" content=\"If you&#039;re working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times. Instead of mktime() use: Linux\/Posix: timegm() Windows: _mkgmtime() For example, let&#039;s use timegm() to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#article\",\"name\":\"mktime() always uses local time zone and converts from UTC\",\"headline\":\"mktime() always uses local time zone and converts from UTC\",\"author\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/ridge_logo1.jpg\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#articleImage\",\"width\":400,\"height\":81},\"datePublished\":\"2020-05-29T17:40:30+00:00\",\"dateModified\":\"2022-05-18T18:49:11+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#webpage\"},\"articleSection\":\"By Ridge Solutions\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.ridgesolutions.ie\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/category\\\/by-kevin-godden\\\/#listItem\",\"name\":\"By Ridge Solutions\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/category\\\/by-kevin-godden\\\/#listItem\",\"position\":2,\"name\":\"By Ridge Solutions\",\"item\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/category\\\/by-kevin-godden\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#listItem\",\"name\":\"mktime() always uses local time zone and converts from UTC\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#listItem\",\"position\":3,\"name\":\"mktime() always uses local time zone and converts from UTC\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/category\\\/by-kevin-godden\\\/#listItem\",\"name\":\"By Ridge Solutions\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#organization\",\"name\":\"Ridge Solutions, Software Development and Software Engineering, Ireland.\",\"description\":\"Some thoughts of a busy Computer Engineer\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/ridge_logo1.jpg\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#organizationLogo\",\"width\":400,\"height\":81},\"image\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/#author\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/\",\"name\":\"Kevin Godden\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2833f41e59a25cf2a9741a05ec383bfdd278762a5e0798a90940e7ab0a107a2?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kevin Godden\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#webpage\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/\",\"name\":\"mktime() always uses local time zone and converts from UTC\",\"description\":\"If you're working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times. Instead of mktime() use: Linux\\\/Posix: timegm() Windows: _mkgmtime() For example, let's use timegm() to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2020\\\/05\\\/29\\\/mktime-always-uses-local-time-zone-and-converts-from-utc\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/#author\"},\"datePublished\":\"2020-05-29T17:40:30+00:00\",\"dateModified\":\"2022-05-18T18:49:11+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#website\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/\",\"name\":\"Ridge Solutions, Software Development and Software Engineering, Ireland.\",\"description\":\"Some thoughts of a busy Computer Engineer\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"mktime() always uses local time zone and converts from UTC","description":"If you're working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times. Instead of mktime() use: Linux\/Posix: timegm() Windows: _mkgmtime() For example, let's use timegm() to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation","canonical_url":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"Kyj52YLp6GOPA44PVBffo9fjW8rgWHYYRF0ZYjfy6ss","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#article","name":"mktime() always uses local time zone and converts from UTC","headline":"mktime() always uses local time zone and converts from UTC","author":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/#author"},"publisher":{"@id":"https:\/\/www.ridgesolutions.ie\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.ridgesolutions.ie\/wp-content\/uploads\/2013\/09\/ridge_logo1.jpg","@id":"https:\/\/www.ridgesolutions.ie\/#articleImage","width":400,"height":81},"datePublished":"2020-05-29T17:40:30+00:00","dateModified":"2022-05-18T18:49:11+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#webpage"},"isPartOf":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#webpage"},"articleSection":"By Ridge Solutions"},{"@type":"BreadcrumbList","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie#listItem","position":1,"name":"Home","item":"https:\/\/www.ridgesolutions.ie","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/by-kevin-godden\/#listItem","name":"By Ridge Solutions"}},{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/by-kevin-godden\/#listItem","position":2,"name":"By Ridge Solutions","item":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/by-kevin-godden\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#listItem","name":"mktime() always uses local time zone and converts from UTC"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#listItem","position":3,"name":"mktime() always uses local time zone and converts from UTC","previousItem":{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/by-kevin-godden\/#listItem","name":"By Ridge Solutions"}}]},{"@type":"Organization","@id":"https:\/\/www.ridgesolutions.ie\/#organization","name":"Ridge Solutions, Software Development and Software Engineering, Ireland.","description":"Some thoughts of a busy Computer Engineer","url":"https:\/\/www.ridgesolutions.ie\/","logo":{"@type":"ImageObject","url":"https:\/\/www.ridgesolutions.ie\/wp-content\/uploads\/2013\/09\/ridge_logo1.jpg","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#organizationLogo","width":400,"height":81},"image":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/#author","url":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/","name":"Kevin Godden","image":{"@type":"ImageObject","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d2833f41e59a25cf2a9741a05ec383bfdd278762a5e0798a90940e7ab0a107a2?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kevin Godden"}},{"@type":"WebPage","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#webpage","url":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/","name":"mktime() always uses local time zone and converts from UTC","description":"If you're working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times. Instead of mktime() use: Linux\/Posix: timegm() Windows: _mkgmtime() For example, let's use timegm() to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.ridgesolutions.ie\/#website"},"breadcrumb":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/#breadcrumblist"},"author":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/#author"},"creator":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/#author"},"datePublished":"2020-05-29T17:40:30+00:00","dateModified":"2022-05-18T18:49:11+00:00"},{"@type":"WebSite","@id":"https:\/\/www.ridgesolutions.ie\/#website","url":"https:\/\/www.ridgesolutions.ie\/","name":"Ridge Solutions, Software Development and Software Engineering, Ireland.","description":"Some thoughts of a busy Computer Engineer","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.ridgesolutions.ie\/#organization"}}]},"og:locale":"en_US","og:site_name":"Systems and Embedded Software Engineering, Ireland. | Some thoughts of a busy Computer Engineer","og:type":"article","og:title":"mktime() always uses local time zone and converts from UTC","og:description":"If you're working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times. Instead of mktime() use: Linux\/Posix: timegm() Windows: _mkgmtime() For example, let's use timegm() to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation","og:url":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/","article:published_time":"2020-05-29T16:40:30+00:00","article:modified_time":"2022-05-18T17:49:11+00:00","twitter:card":"summary","twitter:title":"mktime() always uses local time zone and converts from UTC","twitter:description":"If you're working with UTC times, you may be upset to find that mktime() always converts using your local time zone thus wrecking your UTC times. Instead of mktime() use: Linux\/Posix: timegm() Windows: _mkgmtime() For example, let's use timegm() to make a UTC time which we will pass to SolarAzEl() to calculate the Solar Elevation"},"aioseo_meta_data":{"post_id":"2805","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"aioseo-article-634e729043287","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-09-13 11:19:05","updated":"2026-08-07 16:46:47","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ridgesolutions.ie\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ridgesolutions.ie\/index.php\/category\/by-kevin-godden\/\" title=\"By Ridge Solutions\">By Ridge Solutions<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tmktime() always uses local time zone and converts from UTC\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.ridgesolutions.ie"},{"label":"By Ridge Solutions","link":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/by-kevin-godden\/"},{"label":"mktime() always uses local time zone and converts from UTC","link":"https:\/\/www.ridgesolutions.ie\/index.php\/2020\/05\/29\/mktime-always-uses-local-time-zone-and-converts-from-utc\/"}],"_links":{"self":[{"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/posts\/2805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/comments?post=2805"}],"version-history":[{"count":0,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/posts\/2805\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/media?parent=2805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/categories?post=2805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/tags?post=2805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}