w3resource

PHP : date_default_ timezone_set() function

Description

The date_default_timezone_set() sets the default timezone used by all date/time functions in a script.

Version:

(PHP 5 and above)

Syntax:

date_default_timezone_set(timezone_identifier)

Parameters:

Name Description Required /
Optional
Type
timezone_identifier The timezone identifier. Required String

Return value:

FALSE if the timezone_identifier isn't valid, or TRUE otherwise.

Value Type:Boolean.

Example:

<?php
echo(date_default_timezone_set('Asia/Calcutta'));
?>

Sample Output:

1

View the example in the browser

See also

PHP Function Reference

Previous: date_default_ timezone_get
Next: date_sunrise



PHP: Tips of the Day

Convert HTML + CSS to PDF

Important: Please note that this answer was written in 2009 and it might not be the most cost-effective solution today in 2019. Online alternatives are better today at this than they were back then.

Here are some online services that you can use:

  • PDFShift
  • Restpack
  • PDF Layer
  • DocRaptor
  • HTMLPDFAPI
  • HTML to PDF Rocket

Have a look at PrinceXML.

It's definitely the best HTML/CSS to PDF converter out there, although it's not free (But hey, your programming might not be free either, so if it saves you 10 hours of work, you're home free (since youalso need to take into account that the alternative solutions will require you to setup a dedicated server with the right software).

Ref : https://bit.ly/384yytr