parse_date function is defined as follows:
parse_date(value, pattern, [locale], [timezone]) : DateTime, with the parameters further defined as:
value String Date string to parse pattern String The pattern to parse the date with, see http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html locale String The locale to parse the date with, see https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html timezone String The timezone to apply to the date, defaults to UTC
The way I understand it, the
timezone parameter is a “converter” to apply to the parsed date; the date will be parsed as a Date object, i.e. in a time zone defined by the parsed string, and then will be converted to the time zone defined by the
timezone parameter. Is that correct, or did I misunderstand?
Now, assuming I got it right, I’m not sure the argument is actually used. In the source code,
timezone seems to come from somewhere different than the other arguments. I haven’t dug deeper into the code to see how this is used, but it looks odd.