note 121261 deleted from datetime.formats.date by salathe

From: Date: Fri, 12 Apr 2019 15:31:20 +0000
Subject: note 121261 deleted from datetime.formats.date by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-210594@lists.php.net to get a copy of this message
Note Submitter: joel dot r dot geurts at gmail dot com ---- When a javascript date object is saved to a database directly, a string with the following format is saved: Thu Jan 01 1970 07:00:00 GMT-0500 (Eastern Standard Time) I read through this article and didn't see any matches for an allowed pattern, so I thought it couldn't work. Then I was encouraged by a coworker to just try dropping the time zone in parenthesis '(Eastern Standard Time)' and lo and behold it worked. TLDR: dropping the second time zone from a string from a javascript date object saved into a DB, will allow it to be properly parsed.

« previous php.notes (#210594) next »