I’d like to have different posts appear with different datelines (Date/Time/Place), but appearing in UTC time order. (This is for a special weblog event I’m planning; it’ll run over a 6 week period, many posts will be created with pre-determined timestamps rather than live-as-you-go timestamps). This is for a WP 1.5 site. Zones/locations will vary across the U.S., in Europe, and in Pacific Ocean.
Begin with UTC: I see from the wiki that WP natively computes time in UTC, and then displays it according to “your own time zone.”
Since I want to make it so that the events fall in absolute chronological order, I’m going to change the date for the blog to UTC. (aaack, what will become of all the legacy Pacific Time Zone posts?)
Customize for time zone using a custom field:
I figure that by using a custom fields, I can assign an individual time zone per post (example: field tz is assigned +1 or +10 or -6 or -4).
Posts appear in absolute order, displaying “local” time. As such, thing may “seem” out of order, but there it is.
So two posts, dated (a) July 2, 0445 UTC and (b) July 2, 0450 UTC would appear in order (most recent at top):
(b) July 1, 10:50 pm. California. bedtime.
(a) July 2, 5:45 am. Europe. Sun rises
(naturally, since DATE information is all over the place, I’m going to lose an overall reference to DATE, or else make DATE follow the most dominant time zone in the whole series.)
For Custom Field, I’m starting with the coffee2code plugin Get Custom Field. I figure that there’s more calculation to do with the field once it’s been *got* but I’m not quite sure what.
I’m pretty feeble with php, but here’s what I’ve worked out so far:
if [exists custom field ‘tz’]
do some kind of calculation of and display of the tag the_time()
Should I create my own custom time variable for the calcuation, e.g., $post_local_time and call that somewhere in the post, or should I do something that manipulates the value of
- The topic ‘Different time zones, per-post, using custom field. Need help, ideas’ is closed to new replies.