Description (from Rosetta Code)
Given the date string "March 7 2009 7:30pm EST", output the time 12 hours later in any human-readable format.
As extra credit, display the resulting time in a time zone different from your own.
Step 1. Creating the initial time
Fōrmulæ is highly internationalized software. The task requires to parse a time from a string in very localized and specific format. We prefer to get a lower score for this task in favor to show a more general form:
The initial time can be created with the CreateTime expression as follows: (note than the hour is in 24-hour format)
Time expressions in Fōrmulæ are never related to any time zone. When creating the expression, one is defined in order to provide the time zone the rest of time components are referred to.
On the other hand, visualizing Time expressions needs to be always related to a time zone. It is always the current time zone (the time zone of the computer where the program is running on). For the example, it was run in a computer in pacific time zone, so the Time expression is shown (the blue rectangle) referred to it.
Step 2. Adding 12 hours
Is there any bug ? No. The daylight saving time (in the pacific time zone), for 2009 started March 8 at 2:00 AM, at which time clock is adjusted 1 hour later. It occurred between the 12 hour addition of the example.
Please note that the text of the first expressions ends with PST (Pacific Standard Time), while the second one ends with PDT, or Pacific Daylight (Saving) Time.
Step 3. Showing results
So, if the visualization of Time expressions are always referred to the same time zone, how to show the time they represent referred to other time zones ?
Let us use them for the Eastern time zone:
Now, let us show the same point of time, but related to another time zone, for example the Mountain time zone: