Monday, January 20, 2014

Timezone in PHP

By default PHP get the timezone from the "php.ini" file.

Get Current Timezone:
echo date_default_timezone_get(); // Will return current timezone used by PHP.

Set Timezone:
date_default_timezone_set('Asia/Kolkata'); // Will set PHP timezone to specified.

No comments:

Post a Comment

Learn JavaScript - String and its methods - 16

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>String and it's methods - JS&l...