Issue #022

Time zones & ConvertKit

I never really noticed this until I moved to Europe from the US, but gah "you're obviously in the United States" is absolutely the default position for most time-sensitive emails.

Now, in the US, there are basically 4 major time zones: Eastern, Central, Mountain, and Pacific. (Everyone always forgets about Alaska/Hawaii.)

And growing up there, I remember thinking how weird it was that TV shows would be advertised as starting at "8pm Eastern, 7pm Central"... I guess everyone west of the Great Plains had to do a bit of mental mathematics?

But now that I'm both 1) in a position where I get a lot of emails with dates/times in them and 2) not in the US, it's become increasingly obvious just how US-centric the Internet is.

Chances are, the next online event / webinar you get invited to will look something like this:

This is fine if you live in the States and are familiar with what "ET", "PDT", "CST", etc. mean, but what about the rest of the world?

(Quick sidenote: in the above screenshot, are you as confused as I am by how the Pacific US timezone is still in daylight time, but those in Central time aren't...?)

Use the power of ConvertKit's Liquid templating to show sensible, localised dates and times for your subscribers.

Here's how to stop confusing the non-Americans on your list:

Step #1: Record the timezone for each of your subscribers

(This is the hardest part, unfortunately. I'm working on a way to make this one-click easy...)

ConvertKit does geolocate your subscribers, but unfortunately they don't make it easy to access that data.

Additionally, I don't think they're capturing the timezone of your subscribers – which is unfortunate.

However, if you're willing to pull up your sleeves and wrestle with the ConvertKit API you can make this work.

Web browsers, when asked by a website, will give up the visitor's system timezone settings. This makes it so that websites can wish you good morning or show you a clock in your timezone. Pretty nifty, when done right.

With a bit of JavaScript – ideally on something like your post-optin confirmation page – you can capture the visitor's timezone and then push it up to their ConvertKit contact record.

I'm doing this with RightMessage, since it gives me a bridge between my website and the contact records of subscribers who are visiting my website.

Here's what that code looks like on Create & Sell:

What's happening here is after RightMessage associates the visitor on my website with a contact record, I then grab the timezone from the web browser and then push it back up to RightMessage to set the "timezone" custom field.

(To reiterate what I said above, this is the hardest part and I realise JavaScript code is not what most of you want to see! I'm working on a way to make this one-click easy assuming CK doesn't beat me to it...)

This results in IANA Time Zone data getting attached to each of your subscribers:

Step #2: Use a bit of Liquid templating whenever you want to show a date/time

Alright, with that out of the way it's time to transform your dates and times!

Here's the template you'll be using, feel free to copy-and-paste somewhere you can easily reference:

{{ "2021/09/30 2:00 PM EDT" | in_time_zone: subscriber.timezone | date: "%B %e at %l:%M %p %Z" }}

The first component – "2021/09/30 2:00 PM EDT" – is the date and time. The underlying programming language ConvertKit uses, Ruby, is pretty forgiving at parsing dates and times. But I'd encourage you stick to the above format: YEAR/MONTH/DAY HOUR:MINUTES MERIDIAN TIMEZONE

If you want to drop the timezone and AM/PM you can. By dropping the timezone, times will be assumed to be GMT. And 15:00 will yield the same result as 3:00 PM.

The second component – in_time_zone: subscriber.timezone – is a Liquid filter that will transform the inputted date/time (what you entered above) into a new date/time for a specific timezone. This will grab it from the "timezone" custom field, so if you're using a different field name you'll need to make a minor tweak.

If your subscriber doesn't have a timezone set, the default timezone will be whatever you originally entered (e.g. "2:00 PM EDT") – so just keep that in mind.

Finally, the third component – date: "%B %e at %l:%M %p %Z" – is what you want your outputted date/time to look like.

The bit between the quotation marks... %B %e... describes what parts of a date/time you'll be displaying. Rather than trying to figure out what "%I", I'd highly recommend checking out my friend Mike Buckbee's For A Good Strftime website, which lets you visually build out the date/time format that ConvertKit and Liquid need.

You might be tempted to just modify the time you display, but remember: an event on the 30th in America might actually occur on the 31st in Australia!

Let's now look at what {{ "2021/09/30 2:00 PM EDT" | in_time_zone: subscriber.timezone | date: "%B %e at %l:%M %p %Z" }} would look like for...

  • Londoners → September 30 at 7:00 PM BST

  • Hong Kongers → October 1 at 2:00 AM HKT

  • Alaskans → September 30 at 10:00 AM AKDT

  • Jamaicans → September 30 at 1:00 PM EST

Step #3: Delight the non-Americans

Pretty nifty, isn't it?

I know a lot of this looks superficially pretty tedious to get going. I assure you, however, once you have it up and running it's simply a matter of copy-and-pasting & tweaking your input date/times.

It'll become second-nature as you write emails, and you won't need to ever need to task your non-American readers with figuring out the nuances of Eastern daylight time ever again.