Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMPulse

A runtime inspector and control panel for GameMaker. · By topherlicious

[Error] Invalid date conversion - dates earlier than 1 Jan 1970 will be incorrect

A topic by Ocram Ratte created 59 days ago Views: 36 Replies: 4
Viewing posts 1 to 2
- var _epoch = floor(date_create_datetime(1970, 1, 1, 0, 0, 0));
+ var _epoch = floor(date_create_datetime(1971, 1, 1, 0, 0, 0));

At gm_pulse Create Event, line 822

Not sure why but when trying to take a screenshot it will crash, changing 1970 to 1971 fixed it, maybe it’s because of the timezone.

Developer

Huh, thanks for sharing this, I've never seen that before. Glad it's an easy fix. Would you mind sharing your GM version?

IDE v2024.6.1.160 Runtime v2024.6.1.208

Developer

Yeah, it works for me so I guess it must be a time zone related difference? That is unexpected behavior from GM though, that shouldn't fail. Does it produce any kind of error?

Yeah, it crashes the game.

{ message : "invalid date conversion - dates earlier than 1 Jan 1970 will be incorrect", script : "gml_Script_anon@21528@___struct___94@gml_Object_gm_pulse_Create_0", line : 822, stacktrace : [ "gml_Script_anon@21528@___struct___94@gml_Object_gm_pulse_Create_0 (line 822)","gml_Object_gm_pulse_Other_68 (line 39) - 				_h.handler(_request, _response);
" ], longMessage : "ERROR in action number 1
of Async Event: Networking for object gm_pulse:
invalid date conversion - dates earlier than 1 Jan 1970 will be incorrect
 at gml_Script_anon@21528@___struct___94@gml_Object_gm_pulse_Create_0 (line 822) - 					var _epoch = floor(date_create_datetime(1970, 1, 1, 0, 0, 0));
" }