Skip to content

Using Java and CFML to determine a date’s BST/GMT daylight savings time

An interesting problem. We wanted to display (GMT/BST) after some dates on the UI of a website. In order to do this, I needed to use a Java object (java.util.TimeZone) and the inDaylightTime() method.

Here’s the function I came up with. If something goes wrong, it just returns a blank string.

https://gist.github.com/recantha/bd54dbc575e5377346268170d8fe28c4

Published incfml