anchor.diff:                                   TZTime = to_time(Tz),
                                    Add = calendar:datetime_to_gregorian_seconds({{0,1,1},TZTime}),
                                    Secs = calendar:datetime_to_gregorian_seconds({to_date(Date), to_time(Tm)}),
  -                                 calendar:universal_time_to_local_time(calendar:gregorian_seconds_to_datetime(Secs+(Mul*Add)))
  +                                 calendar:gregorian_seconds_to_datetime(Secs+(Mul*Add))
                            end,
                   case string:tokens(Time, "+") of
                       [Time1, TZ] ->
  
positive.code:         LocalD -> LocalD
      end.
  
  %% @doc Convert an input to a (local) datetime, using to_date/1 and
  %% to_time/1.  When the input is a string, it is expected to be in iso
  %% 8601 format, although it can also handle timestamps without time
  %% zones. The time component of the datatime is optional.
  to_datetime({{_,_,_},{_,_,_}} = DT) -> DT;
  
negative.code:                                 case lists:reverse(Time) of
                                      [$Z|Rest] ->
                                          %% Timestamp ending on Z (= UTC)
                                          {to_date(Date), to_time(lists:reverse(Rest))};
                                      _ ->
                                          %% Timestamp without time zone
                                          {to_date(Date), to_time(Time)}
  