1
Ilija
XOOPS time, format and offset
  • 2003/10/10 16:33

  • Ilija

  • Just popping in

  • Posts: 23

  • Since: 2003/9/9 1


How to get system time settings, format and offset? I want to use it in my module...

2
ackbarr
Re: XOOPS time, format and offset

Timezones
$xoopsConfig['default_TZ'] - stores user default timezone
$xoopsConfig['server_TZ'] - stores system timezone
$xoopsUser->getVar("timezone_offset") - stores current user's timezone

Date Formats Constants (See /language/<language>/global.php)
_DATESTRING - Normal date format
_MEDIUMDATESTRING - Shorter date format
_SHORTDATESTRING - Shortest date format

Helpful Date functions (/includes/functions.php)
xoops_getUserTimestamp($time, $timeoffset="")
Alters the $time by the specified $timeoffset

formatTimestamp($time, $format="l", $timeoffset="")
Function to display formatted times in user timezone

userTimeToServerTime($timestamp, $userTZ=null)
Function to calculate server timestamp from user entered time (timestamp)

Login

Who's Online

179 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 179


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits