internal package
Foswiki::Plugins::LocalTimePlugin internal package
LocalTimePlugin Implements the %LOCALTIME% macro to display a formatted date and time possibly adjusted for a given time zone.
Plugin Version: $Rev: 7117 (2010-04-07) $
$topic
- the name of the topic in the current CGI query
$web
- the name of the web in the current CGI query
$user
- the login name of the user
$installWeb
- the name of the web the plugin topic is in
Initializes and installs the handler routine for the %LOCALTIME% macro.
Returns: 1 on success, 0 on failure
Process the %LOCALTIME% macro and return the desired date/time as a formatted string. Uses the Date::Handler and Date:Parse Perl modules.
$session
- a reference to the Foswiki session object
$params
- a reference to a Foswiki::Attrs object containing the macro parameters DEFAULT
- (optional) the desired timezone in which to render the date/time. Defaults to the LOCALTIMEPLUGIN_TIMEZONE preference setting or UTC.
datetime
- (optional) the date/time to display, assumed to be in UTC unless the string contains a timezone identifier. Defaults to the current date and time
format
- (optional) the desired output format specifier string. Defaults to the LOCALTIMEPLUGIN_DATEFORMAT preference or to the Foswiki '$longdate' format
locale
- (optional) the desired locale definition to use when displaying the date and time. Defaults to the LOCALTIMEPLUGIN_LOCALE preference or to the site's locale defined in $Foswiki::cfg{Site}{Locale}
fromtopic
- (optional, deprecated) the web.topic from which to set the value of the TIMEZONE variable, use the LOCALTIMEPLUGIN_TIMEZONE preference instead
dateGMT
- (optional, deprecated) the same as the datetime
parameter, use datetime
instead
$theTopic
- the name of the topic being processed
$theWeb
- the name of the web containing the topic being processed
Returns: the date and/or time as a formatted string or an error message upon failure
Invoke the mod_perl2-safe helper script to format and return the date. Uses the APR::Base64 Perl module.
$date
- a reference to a Date::Handler object containing the date to format
$format
- the desired format string
$topic
- the topic containing the %LOCALTIME% macro
Returns: the date and/or time as a formatted string
Log a warning and debug message. The topic is prepended to the message.
$topic
- the web.topic being processed
$msg
- the message text to write to the warning and debug logs
Write a function entry message to the debug log if debug logging is enabled. The topic is prepended to the message.
$topic
- the web.topic being processed
$func
- the name of the function being logged
$args
- a reference to a hash containing the arguments passed to $func
Write the supplied message to the debug log if debug logging is enabled. The Perl package name and topic are prepended to the message.
$topic
- the web.topic being processed
$msg
- the message text to write to the debug log