Opened 15 years ago
Last modified 5 years ago
#12885 new defect (bug)
LiveJournal importer uses GMT date/time as local date/time
Reported by: | kurtmckee | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Import | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
The LiveJournal importer takes a comment's date/timestamp, which is in GMT, and inserts it into the database as the comment's local date/timestamp. In my timezone (U.S. Central, DST), a comment posted at 12:00pm local time (5:00pm GMT) will be imported to the database as having been posted at 5:00pm local time (10:00pm GMT).
I've attached a patch that I've successfully tested on Wordpress 2.9.2, and it appears to be easily ported to trunk. One caveat: it appears that there are two timezone settings in the Wordpress database (timezone_string and gmt_offset), but as my database has no value for gmt_offset, I don't know if I need to account for that, nor can I test that.
Attachments (2)
Change History (11)
#1
@
15 years ago
Note about the gmt_offset, my installation didnt have a value in it either, after upgrading from wpmu to 3.0
#3
@
14 years ago
Has anyone had an opportunity to review the patch? Are there any suggestions that I should incorporate in order to make the code acceptable to commit?
#4
@
14 years ago
I think we have a function somewhere to do that conversion -- would it be get_date_from_gmt?
#5
@
14 years ago
Thanks for the quick response and the tip! I'll look for that function (or a similar one), update the patch to work with trunk, and test it as soon as possible.
Adjust LiveJournal comment dates and times from GMT to local time (applies to WP 2.9.2)