anchor.diff:      date/2,
       date/3,
       gmdate/2,
  -    gmdate/3
  +    gmdate/3,
  +    date_default_timezone_set/2,
  +    date_default_timezone_get/1
   ]).
   
   -include("ephp.hrl").
  
positive.code: -spec init(Context :: context()) -> ok.
  
  init(Context) ->
      ephp_context:register_func(Context, <<"time">>, ?MODULE, time),
      ephp_context:register_func(Context, <<"date">>, ?MODULE, date),
      ephp_context:register_func(Context, <<"gmdate">>, ?MODULE, gmdate),
      ok. 
  
  -spec time(Context :: context()) -> integer().
  
negative.code:     TZ = "GMT",
      Date = calendar:now_to_universal_time({M,S,U}),
      date_format(Format, <<>>, {Timestamp, Date, TZ}).
  
  -spec date_default_timezone_get(Context :: context()) -> binary().
  
  date_default_timezone_get(Context) ->
      ephp_util:to_bin(ephp_context:get_tz(Context)).
  
  -spec date_default_timezone_set(Context :: context(), TZ :: binary()) -> binary().
  
  date_default_timezone_set(Context, TZ) ->
      ephp_context:set_tz(Context, TZ),
      null.
  
  %% ----------------------------------------------------------------------------
  %% Internal functions
  