I have a parse that reads in a file and populates my database. The
problem is that when I use Time.parse it interprets the second digit as
the month rather than the day.
For example:
Input: 12-04-2007 21:15:56
Shows as Apr 12, 2007
I have a parse that reads in a file and populates my database. The
problem is that when I use Time.parse it interprets the second digit as
the month rather than the day.
For example:
Input: 12-04-2007 21:15:56
Shows as Apr 12, 2007
Date/Time.parse uses a variety of heuristics in an attempt to deal
with the various ways we present dates around the world.
I think that using “-” for the separator triggers it to interpret the
date in EU format dd-mm-yyyy and a ‘/’ causes it to use the US
interpretation mm/dd/yyyy