Bug? Correct timezone is not applied to dummy post in multisite
-
I encountered this problem and have struggled with it for hours without luck. The context is we use our custom script to allow users to create multisite. I have specified the option ‘timezone_string’=> ‘America/New_York’ while calling the function wpmu_create_blog(). The problem is the blog is still created under UTC-0 (as shown in mysql db) and so is the dummy post, dummy page, and dummy comment. However the ‘timezone_string’ setting is applied after the dummy contents are created. So if our user publishes a post immediately after setting up the multisite, their post will become the first post but the dummy post becomes the second since New York is behind UTC-4.
This looks like a bug in the wpmu_create_blog() function. Shouldn’t blog options be applied before dummy contents are injected? But no matter if this is a bug or not, how can I fix this error? I have made sure the main blog uses the correct timezone, and the Apache time is correct as well. What am I missing. I also tried update_site_option() before calling wpmu_create_blog(), which didn’t help.
You help is very appreciated!
- The topic ‘Bug? Correct timezone is not applied to dummy post in multisite’ is closed to new replies.