WPIntell

Source evidence

Change TimeZone Before Plugins Loaded – 2

Use Client's Time Zone · support · 2022-08-22T17:25:00+00:00

mixedsentiment
mediumseverity
0.66relevance
5replies
Evidence onlycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

1 / 1 rows with source links

100.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

0 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Mr. Gedanggoreng resolved
Hi, I have tried your last update, but it didn’t change the timezone before the plugins loaded. Will you update/fix it? Thanks. I hope to be able try a different fix tomorrow. I’ll let you know how it goes. This reply was modified 3 years, 9 months ago by drmikegreen . . Did you use the file at https://u.pcloud.link/publink/show?code=XZkUPkVZTmOJwiq983j9meqMCAaa0J26zpwX or the version (1.1.4) in the WordPress Repository? Forget that link. It couldn’t work. Try this one instead: Use Client’s Time Zone – Version: 1.1.5-beta . I’m not sure, however, that what you want can be accomplished. Let me know how it goes. After a lot of searching, I’ve come to the conclusion that what you want cannot be done — in spite of my initial thinking that it could. The reason is that WordPress does not read cookies from the HTTP request until after the plugins are loaded. See the sequence of actions under “Actions Run During a Typical Request” at Plugin API/Action Reference and the comment “Runs after cookies have been read from the HTTP request” on the same page. So a reload action based on the availability of the cookie holding the client’s timezone cannot be initiated until after the plugins are loaded. If I’m wrong, I’ll gladly do what I can to revise the plugin accordingly.

Comments

5 shown
drmikegreen 2022-08-22T21:04:00+00:00

I hope to be able try a different fix tomorrow. I’ll let you know how it goes. This reply was modified 3 years, 9 months ago by drmikegreen .

drmikegreen 2022-08-22T21:05:00+00:00

.

drmikegreen 2022-08-23T19:29:00+00:00

Did you use the file at https://u.pcloud.link/publink/show?code=XZkUPkVZTmOJwiq983j9meqMCAaa0J26zpwX or the version (1.1.4) in the WordPress Repository?

drmikegreen 2022-08-24T21:15:00+00:00

Forget that link. It couldn’t work. Try this one instead: Use Client’s Time Zone – Version: 1.1.5-beta . I’m not sure, however, that what you want can be accomplished. Let me know how it goes.

drmikegreen 2022-08-30T20:26:00+00:00

After a lot of searching, I’ve come to the conclusion that what you want cannot be done — in spite of my initial thinking that it could. The reason is that WordPress does not read cookies from the HTTP request until after the plugins are loaded. See the sequence of actions under “Actions Run During a Typical Request” at Plugin API/Action Reference and the comment “Runs after cookies have been read from the HTTP request” on the same page. So a reload action based on the availability of the cookie holding the client’s timezone cannot be initiated until after the plugins are loaded. If I’m wrong, I’ll gladly do what I can to revise the plugin accordingly.