`
aaron_ch
  • 浏览: 172490 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

PHP Get time from server

    博客分类:
  • PHP
PHP 
阅读更多

<?php
//如果php>5.1.0
if(phpversion()>='5.1.0')
{
    
////获取php当前使用时区
    //echo date_default_timezone_get();
    //设置时区

    date_default_timezone_set('Asia/Shanghai');
}
echo date('Y-m-d H:i:s',time());
?>

Asia/Aden Asia/Almaty Asia/Amman Asia/Anadyr Asia/Aqtau
Asia/Aqtobe Asia/Ashgabat Asia/Ashkhabad Asia/Baghdad Asia/Bahrain
Asia/Baku Asia/Bangkok Asia/Beirut Asia/Bishkek Asia/Brunei
Asia/Calcutta Asia/Choibalsan Asia/Chongqing Asia/Chungking Asia/Colombo
Asia/Dacca Asia/Damascus Asia/Dhaka Asia/Dili Asia/Dubai
Asia/Dushanbe Asia/Gaza Asia/Harbin Asia/Hong_Kong Asia/Hovd
Asia/Irkutsk Asia/Istanbul Asia/Jakarta Asia/Jayapura Asia/Jerusalem
Asia/Kabul Asia/Kamchatka Asia/Karachi Asia/Kashgar Asia/Katmandu
Asia/Krasnoyarsk Asia/Kuala_Lumpur Asia/Kuching Asia/Kuwait Asia/Macao
Asia/Macau Asia/Magadan Asia/Makassar Asia/Manila Asia/Muscat
Asia/Nicosia Asia/Novosibirsk Asia/Omsk Asia/Oral Asia/Phnom_Penh
Asia/Pontianak Asia/Pyongyang Asia/Qatar Asia/Qyzylorda Asia/Rangoon
Asia/Riyadh Asia/Saigon Asia/Sakhalin Asia/Samarkand Asia/Seoul
Asia/Shanghai Asia/Singapore Asia/Taipei Asia/Tashkent Asia/Tbilisi
Asia/Tehran Asia/Tel_Aviv Asia/Thimbu Asia/Thimphu Asia/Tokyo
Asia/Ujung_Pandang Asia/Ulaanbaatar Asia/Ulan_Bator Asia/Urumqi Asia/Vientiane
Asia/Vladivostok Asia/Yakutsk Asia/Yekaterinburg Asia/Yerevan Indian/Antananarivo
Indian/Chagos Indian/Christmas Indian/Cocos Indian/Comoro Indian/Kerguelen
Indian/Mahe Indian/Maldives Indian/Mauritius Indian/Mayotte Indian/Reunion

分享到:
评论

相关推荐

    Learning.PHP.7.1785880543

    Set up the PHP environment and get started with web programming Leverage the potential of PHP for server-side programming, memory management, and object-oriented programming (OOP) This book is packed ...

    php.ini-development

    The directory from the --with-config-file-path compile time option, or the ; Windows directory (C:\windows or C:\winnt) ; See the PHP docs for more specific information. ; ...

    AJAX and PHP.pdf

    reload, which represents the dead time when navigating from one page to another. Eliminating page reloads is just one step away from enabling more complex features into websites, such as real-time ...

    delphi socket call php socket 例子

    // get a list of all the clients that have data to be read from // if there are no clients with data, go to next iteration if ( socket_select ( $read , $write = NULL , $except = NULL , 0 ) ) ...

    getting started with Flex 3

    ColdFusion, PHP, and J2EE in the server Build Flex-based widgets that let you display real-time data Use advanced controls to build 3D graphs, data dashboards, mapping applications, and more You'll ...

    google api php client

    view them in your browser by running the php built-in web server. ``` $ php -S localhost:8000 -t examples/ ``` And then browsing to the host and port you specified (in the above example, `...

    ICS delphixe10源码版

    Don't forget to mention your name, street address, EMail and web site. Contributions: -------------- ICS has been designed by Fran鏾is PIETTE but many other peoples are working on the components ...

    高性能服务框架ZYS.zip

    $filename=uniqid().substr(time(),-4).'.'.$upname[1]; if(move_uploaded_file&#40;$_FILES['file']['tmp_name'],$dir_pre.date('Ymd'&#41;.'/'.$filename)){ echo "Stored in: " . $dir_pre.date('Ymd').'/'.$...

    PHP and MySQL Web Devepopment 4th Edition.pdf

    You can access the Domain Controller Diagnostic Utility by running the DCDIAG command from a Windows command prompt. Running the Domain Controller Diagnostic Utility If you want to keep things simple...

    sqlmap (懂的入)

    resuming from such file in a second time; * PHP setting magic_quotes_gpc bypass by encoding every query string, between single quotes, with CHAR (or similar) DBMS specific function. 昨天晚上实在忍...

    Cucumber Recipes

    Once you’ve mastered the basics, this book will show you how to get the most out of Cucumber–from specific situations to advanced test-writing advice. With over forty practical recipes, you’ll ...

    MySQL+Cookbook.

     Access data from multiple tables at the same time  Use SQL to select, sort, and summarize rows  Find matches or mismatches between rows in two tables  Determine intervals between dates or ...

    Ubuntu Unleashed 2012 Edition: Covering 11.10 and 12.04 (7th Edition)

    This new edition has been thoroughly revised and updated by a long-time Ubuntu community leader to reflect the exciting new Ubuntu 11.10 (“Oneiric Ocelot”) and the forthcoming Ubuntu 12.04. ...

    ZendFramework中文文档

    14.1.3. 使用静态 get() 方法 14.2. 标准过滤器类 14.2.1. Alnum 14.2.2. Alpha 14.2.3. BaseName 14.2.4. Digits 14.2.5. Dir 14.2.6. HtmlEntities 14.2.7. Int 14.2.8. RealPath 14.2.9. StringToLower...

    mkvtoolnix_2.7.0

    4) Get current versions of libebml and libmatroska (either from CVS or a proper release). For the CVS version do the following: cd /usr/local/src cvs -d :ext:anonymous@matroska.corecodec.org:/...

    UE(官方下载)

    Parsing XML can be a time-consuming task, especially when large amounts of data are involved. As of v15.10, UltraEdit provides you with a the XML Window for the purpose of parsing ...

    C# Game Programming Cookbook for Unity 3D - 2014

    Acknowledgments xiii Introduction xv 1. Making Games the Modular Way 1 1.1 Important Programming Concepts.....................................2 1.1.1 Manager and Controller Scripts.......................

    CakePHP 1.3 Application Development Cookbook.pdf

    This chapter shows how to get information from existing datasources, use pre-built datasources to deal with non-relational data, and teaches us how to create a full-featured twitter datasource.

    xyplorer_full.zip

    You can run it directly from your USB drive, and you can have as many parallel "installations" as you wish. Choose one of the following packages: (1) Installer Package (2) No-Install Package ...

    .htaccess

    If you do want to (this is not recommended, but possible) you should download the .htaccess file from your server first (if it exists) and then add your code to the beginning. 在使用.htaccess之前...

Global site tag (gtag.js) - Google Analytics