Posted May 26, 2022
coreydd: I'm far from a competent programmer, but I'm trying my hand at some crawling. Does anyone know how to convert the globalReleaseDate to a human-readable form? I can't figure out the conversion. It doesn't seem to be an offset, so I just don't know, and there's nothing I can find in a pretty extensive search. Thanks!
Let me check the datetime format... From https://api.gog.com/v2/games/1295420179
title: "BEAUTIFUL DESOLATION",
globalReleaseDate: "2020-02-26T00:00:00+02:00"
Um, how is that not human readable? The game was released on the 26th February 2020 on midnight CEST.
This is a standard daytime format the is easily readable for machines as well as humans. If you don't know how to read it: First there is the date in year-month-day with year having 4 digits and month and day 2 digits with leading 0 if neccessary. That is followed by a capital T which separates the time from the date and the time in hour:minute:second format. This is in 24h format and also with leading zeroes, so time ranges from 00:00:00 to 23:59:59. And the last part is the offset to UTC if you don't enter the time in UTC. +02:00 means UTC + 2 hours which is CEST (Central European Summer Time).
Though midnight CEST seams to be a placeholder in my eyes I wouldn't count on the time to be correct. It's probably just supposed to mean the game was released on the 26th February 2020.
P.S.: Any modern programming language should be able to interpret this string and make a datetime object out of it.