Is there a general function which will return the current time as Moodle sees it? For example, the server that runs our Moodle installation is located in Florida, but our office is located in California; thus, everything in Moodle is set for PST, and I have a function that needs to check midnight in PST. If I use the standard PHP time() function, though, it will return EST, not PST.
Any hints?
Look at the functions in lib/moodlelib.php:
userdate()
usertime()
usergetmidnight()
usertimezone()
etc. Not sure which one(s) will fit your task.
userdate()
usertime()
usergetmidnight()
usertimezone()
etc. Not sure which one(s) will fit your task.