Date Time Code

  Home arrow Date Time Code arrow convGMT v2

convGMT v2
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1

    Table of Contents:



    If your server and your location is not on the same time zone then your timestamp would be on the server zone.
    Here is how to get your own GMT instead of Server's GMT

    By : hermawan

    * Function mytime
    * @desc Get timestamp for needed GMT
    * @author Hermawan Haryanto
    * @date June 14, 2004 - 23:10
    * @input
    * gmt String, Needed GMT
    * @output
    * timestamp
    * @sample
    * mytime('+7');
    function mytime ($gmt = '')
    if ($gmt == '' && strlen ($gmt) <= 0) {
    $rtn = time();
    } else {
    $gmdates = explode ('|', gmdate('H|i|s|m|d|Y'));
    $rtn = mktime (
    return $rtn;
    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Date Time Code Articles
    More By Codewalkers

    blog comments powered by Disqus


    - DaysInSpan.php
    - MySQLdateSpan.php
    - DateSpan.php
    - FutureDateFormEntry.php
    - Generate Time Option List for Select stateme...
    - Current Age Script (v2)
    - class for some mysql imitated time functions
    - Current Age Script, up to the last day
    - filemtime_remote
    - Page Generation Time Figure-Outer
    - convGMT v2
    - Benchmarker
    - Simple PHP Calendar
    - Display message according to hour of day
    - Display Date Function

    Developer Shed Affiliates


    © 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap