Skip to content

Timezone abbreviations are not recognized #384

Closed
@disaacs

Description

@disaacs

My datetime field displays the timezone using standard timezone abbreviation, instead of a numeric offest (e.g., as EST instead of -0500). For example:

07/01/12 16:34:47 EST

This is not parsed correctly by the timepicker, so when the timepicker is initialized all the sliders are set to 0, no matter what the displayed time is.

I have found that in the datetime.parseTime() function, at line 957 (of version 1.0.1), if I add \S+ to the timezone regex, then things work better. For example

.replace(/z{1}/ig, '(z|[-+]\\d\\d:?\\d\\d|\\S+)?')

This allows the time in the input field to be successfully matched.

This is not, however, the complete solution. Although the sliders are set correctly, the Time text is not. The timezone displayed in the Time text appears to always be -1100.

Time    16:34:47 -1100

I don't as yet know why. To work around the problem I simple set showTime to false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions