►
From YouTube: User Time Zone Tokens - Backdrop CMS Module
Description
This module converts a date field or dates in the a text field to the users local time zone, based upon their browser detecting their time zone.
This is a pretty simple module, but the video is a bit long because of time spent explaining something about date formats and text filters, both of which are required to make this module work.
A
This
module
is
available
to
us
thanks
to
the
hard
work
of
robert
lang.
Thank
you,
robert
for
this
great
module.
The
module
can
be
found
on
backdropcms.org
under
the
add-ons
modules
tab,
and
the
purpose
of
this
module
is
to
solve
problems
like
this.
We
are
currently
planning
a
cool
event.
I
hope
that
you
will
come
or
we're
there
depending
on
when,
when
you
watch
this
video
backdrop
live.
This
is
an
an
online
international
event.
A
With
people
participating
from
many
different
time
zones,
we
usually
have
at
least
seven
or
eight
different
time
zones
represented
and
in
theory
we
could
have
quite
a
few
more
and
we
want
to
display
things
like
this,
like
a
little
block
showing
when
different
sessions
are
or
session
blocks
are,
but
also
we
have
a
full
schedule
here
of
individual
sessions
or
topics,
and
we
want
people
to
be
able
to
see
when
these
will
be
happening
in
their
local
time
zone,
and
we
have
already
enabled
the
user
time
zone
token
module
to
solve
that
problem.
A
So
these
were
programmed
originally
with
pacific
coast
times.
This
one
was
at
7am
and
thanks
to
the
user,
timezone
token
module,
that's
being
translated
to
use
the
timezone
of
my
browser
because
I'm
not
logged
into
the
site.
So
I
can't
this.
The
site
doesn't
know
who
I
am
or
where
I
live.
But
the
browser
does,
you
know
know
something
about
me.
The
browser
knows
that
I
I'm
in
the
the
central
time
zone,
and
so
this
is
being
converted
based
on
the
center
center
time
zone.
A
Previous
versions
of
backdrop,
live
we've
resolved,
resorted
to
sort
of
complicated
spreadsheets
to
help
people
find
out
when
sessions
are
we're,
hoping
this
works
much
better.
There
are
some
possible
glitches
with
this
we'll
talk
about
those
later,
but
let's,
first
of
all,
just
see
how
this
module
works.
First
of
all,
this
module
is
dependent
on
the
token
filter
module
the
token
filter
module.
A
A
This
is
our
demo
site.
I've
done
a
couple
of
things
to
prepare
this
so
that
we
can
move
along
quickly.
Today.
First
of
all,
I
added
a
content
type
called
event
and
under
that
event,
content
type
I
added
basically
just
a
date
field.
I
pretty
much
use
the
default
settings
for
the
date
field.
I
haven't
done
anything
else.
You'll
see,
I
also
did
add
one
node
called
test
event.
A
This
was
showing
up
on
the
front
page.
You
might
have
noticed
it
already.
This
event
basically
has
a
body
field
and
a
date
and
let's
take
a
look
at
it
edit
it
basically
I've
hard
coded
a
date
here.
There's
no
filters,
nothing
special
here
and
in
the
date
field
I
put
the
same
date,
so
we
have
the
same
date.
This
is
a
week
from
today
october
20th
at
7,
00
pm
central
time,
and
that's
listed
here.
Twice
the
time
zone
user
time
zone
token,
module
can
help.
A
A
The
next
thing
we
need
to
configure
is
under
configuration,
regional
and
language.
There's
user
time
zone
tokens
and
really
this
just
gives
us
a
choice
of
three
settings
and
that
is
to
use
either
the
the
user's
time
zone.
This
is
for
logged
in
users
for
authenticated
user
or
the
server
time
zone
for
anonymous
user.
A
This
can
be
done
with
core,
but
it
doesn't
core-
wouldn't
have
the
token
available
for
this,
that
this
module
provides
the
other
two
options
both
get
a
little
bit
more
complicated.
This
is
use
the
user's
time
zone
for
if
you're
authenticated
in
the
browser's
time
zone
for
anonymous
users.
A
This
is
where
the
magic
starts
to
happen.
This
requires
this
module
and
that
luxon
library
and
the
third
is
to
always
use
the
browser
time
zone,
whether
the
users
are
authenticated
or
anonymous,
and
I
worry
about
option
number
two,
because
there
is
some
possibility
for
confusion.
If
a
user
is
logged
out
in
one
browser
and
logged
in
in
another,
they
could
easily
end
up
with
two
different
times
appearing,
and
there
are
ways
around
that,
but
anyways
we're
going
to
work
with
this
third
option.
A
So
we
have
to
go
to
the
content
types
and
we
have
to
go
to
events,
and
then
we
want
to
manage
the
display
and
if
you
hopefully,
work
with
display
modes
before
this
is
the
default
display
mode
that
we
use
on
the
the
node
page
and
in
here
we
have
the
date
field
and
you'll,
see,
there's
a
date
format
and
the
user
time
zone
token
module
provides
an
alternative
date
format,
so
I'm
going
to
go
ahead
and
select
that
and
then
I'm
going
to
hit,
save
and
now
we're
gonna
go
back
so
we're
here
at
our
test
event,
which
is
an
international
user
group
meeting
on
the
topic
of
date
formats.
A
So
at
this
stage
this
should
work
now.
This
should
be
converting
that
date
to
the
user's
time
zone,
but
I'm
in
the
central
time
zone.
So
there's
no
conversion
happening.
What
I'm
gonna
do
is
switch
to
another
browser
where
I'm
not
logged
in.
First
of
all,
to
just
make
that
clear
that
being
logged
in
is
not
affecting
this
and
then
I
also
need
to
figure
out
a
way.
A
How
do
I
make
the
browser
think
that
I'm
in
a
different
place
or
in
a
different
time
zone-
and
I
did
a
little
research
on
that
today
and
I
found
that
if
you
have
the
developer
tools,
you
can
open
up
the
developer
tools
I
get
to
them
by
right-clicking
and
then
clicking
on
the
inspector,
and
then
I
have
these
developer
tools
in
the
right
sidebar.
If
you
don't
know
about
these
developer
tools,
check
it
out.
A
Do
some
googling
learn
about
the
developer
tools,
they're,
really
powerful
and
helpful
if
you're
building
a
site,
especially
if
you're
doing
theming,
but
even
for
things
like
this
and
then
what
I'm
going
to
do?
Is
I'm
going
to
switch
to
the
console?
Okay?
So
I'm
going
to
switch
to
the
console-
and
this
is
a
little
complicated
up
under
these
three
dots
in
the
console.
I
go
to
more
tools
and
I
click
sensors
and
basically,
what
this
lets
me
do
is.
A
A
We
could
jump
over
to
say
not
sao
paulo,
let's
go
to
tokyo
and
refresh
the
page
and
boom.
That
time
is.
Trans
is
automatically
translated
to
9am
a
little
more
reasonable
for
the
folks
in
tokyo
to
participate.
A
That's
part
of
what
we
can
do,
but
there's
another
thing
that
I
want
to
show
you
with
the
user
timezone.
We
haven't
actually
used
the
tokens,
yet
we've
used
the
user
time
zone,
but
we
haven't
used
the
tokens.
So
let's
go
back
to
our
previous
version
and
we're
going
to
edit
this
node
and
what
I'm
going
to
do
is
copy
a
little
bit
of
code.
A
Well,
a
little
bit
of
text
really
not
code.
Basically,
this
is
some
text
saying
here
is
the
token,
and
then
this
is
the
token.
These
are
what
tokens
look
like
in
backdrop
and
there's
a
number
of
different
ways.
We
use
tokens
do
a
little
bit
of
research.
If
you
don't
know
about
tokens,
this
token
has
a
format.
A
We
can
see
the
format
here
in
the
user
time
zones,
documentation
which
is
bracket
and
then
the
words
utz
dash
date,
time
colon
that
is
hard-coded,
that
doesn't
change,
but
then
you
put
the
actual
date
time
of
the
you
know
the
the
original
date
time
and
then
the
format
you
want
that
date,
time
displayed
in
and
there's
a
little
bit
of
stuff
here
to
help
you
with
that
in
the
in
the
description,
I've
went
ahead
and
done
that,
and
what
we
can
see
is
from
here
to
here
is
is
so
we've
got
that
we
have
to
be
very
explicit
about
the
pm
or
am,
and
we
also
have
to
add
a
time
zone
here.
A
This
d,
comma
y
g,
colon,
I
a
e
and
then
capitalization
is
important.
Here-
is
all
based
on
the
php
sort
of
codes
for
for
formats,
and
so
these
gives
you
these
are
in
a
way
kind
of
tokens
or
variables.
You
can
use
to
build
custom
date
formats
and,
if
you
maybe
haven't
thought
about
it
before
there
are
just
almost
an
infinite
number
of
ways
that
you
can
display
dates
things
differences
between.
A
A
Are
you
putting
a
zero
before
the
date
if
it's
one,
digit
or
not,
and
we've
got
different
tokens
for
all
of
these
different
options
and
you
can
combine
them
in
any
combination?
You
want
to
display
the
date.
The
way
you
want,
so
I
went
ahead
and
created
a
display
which
I
think
is
going
to
work
for
us.
Let's
go
ahead
and
save
this
and
we
can
see
right
away.
I
don't
need
to
to
check
in
the
browser
that
this
isn't
working.
A
Okay,
we
need
to
create
a
text
format
that
recognizes
this
token
and
there's
a
text
filter
that
we
have
to
enable
and
use,
and
I
had
a
little
problem-
I'm
not
sure
if
that
text,
format,
conflicts
with
other
text
formats,
but
anyways,
let's
go
to
configuration
content
authoring
here
we
have
text
editors
and
formats,
and
so
I'm
going
to
go
back
to
the
text
formats
and
I'm
going
to
add
a
new
one
and
I'm
going
to
call
it
raw
html
and
raw
html
means
we're
not
filtering
the
html
at
all.
A
Anybody
can
put
any
html
they
want
in
this
page.
So
please
use
this
with
caution,
because
if
you've
got
users,
editing
your
site
and
then
I'm
going
to
put
a
time
zone.
A
So
this
is
a
raw
html
fill
format
that
specifically
set
up
for
time
zone.
We're
not
going
to
be
using
ck
editor
with
this
we're
going
to
have
to
enter
our
code
in
raw
and
I'm
going
to
hit
save
config.
So
now
I
have
a
oh.
I
have
to
configure
this.
I'm
sorry!
I
forgot
one
more
thing.
This
is
only
we're
going
to
leave
this
only
available
for
administrators
and
then
we're
going
to
come
down
here.
A
A
Go
to
edit
this,
it's
all
still
here,
but
we're
going
to
change.
If
we
go
to
formatting
options,
we
can
change
from
filtered
html
to
raw
html
time
zone.
There
we
go.
We
lose
our
little
wysiwyg
editor
because
in
this
format,
we're
going
to
have
to
hard
code
everything,
but
what
we
can
see
is
that
we've
got
a.
We
could
probably
get
rid
of
this.
These
are
just
some
blind
spaces.
A
We've
got
some
paragraph
tags
here
and
some
text
and
then
we
have
our
token
and
this
token
should
work
just
fine
inside
the
paragraph
tags
like
this
no
problem,
so
I'm
going
to
go
ahead
and
save
this
now
with
that
filter.
Let's
go
to
the
page.
Now
we
can
see
that
this
has
changed.
It's
now.
The
token
is
working
it's
displaying
a
date
and
time.
However,
it's
still
the
same
date
and
time
so
in
order
to
test
this
we're
going
to
switch
over
again
to
our
other
browser,
there
we
go.
A
I
had
to
refresh
it
twice
and
again,
everything's
still
at
7
pm
on
the
20th,
but
that's
because
again
the
browser
still
thinks
that
we're
in
the
original
time
zone.
So
what
I
need
to
do
is
come
over
here.
Well,
I
don't
need
to
go
anywhere,
but
I
need
to
switch
this,
so
I
can
change
this
to
berlin.
A
Come
back
here,
refresh
this
and
boom
both
the
the
date
in
the
body
field
and
in
the
date
field
have
been
converted.
Both
of
them
are
now
october,
21st
at
2
a.m,
and
both
of
them
are
using,
whichever
date
format
was
set
for
them,
and
this
is
the
long
date
format
that
I
set
up
with
all
those
things
that
shows
europe
slash
berlin.
I,
like,
I
think,
if
you're
going
to
use
a
module
like
this,
you
want
to
display.
A
You
want
the
user
to
know
what
time
zone
it's
being
displayed
in
and
I'm
not
sure
if
everybody
around
the
world
understands
the
same
time
zone
abbreviations
anyways.
So
this
seems
to
be
working
and
really,
I
don't
think,
there's
anything
more
to
show
you
right
now.
This
is
how
the
time
zone
token
filter
works.
You
could
use
the
same
thing
in
a
block.
You
could
put
it
anywhere.
You're
gonna
have
to
get
creative
with
how
you
use
this.
So
for
my
testing
with
this
modules,
it's
worked
pretty
good.
A
It
does
require
javascript.
So
if
a
user
has
javascript
turned
off
this
module's,
not
gonna
work
and-
and
that
might
be
another-
you
might
want
to
be
thinking
about
fallbacks
for
that,
so
I'm
gonna
hang
it
up
for
today,
and
I
look
forward
to
seeing
you
in
our
next
video.
Please
do
check
out
our
youtube
channel
team
trip
low
thanks.