Jul 26, 2008

Displaying Date And Time (gmt+8)

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Displaying Date And Time (gmt+8)

dvayne
how to display date and time (gmt+8)? any help would be appreciated.

Reply

jlhaslip
the php manual might be handy for this.

http://docs.php.net/manual/en/function.date.php
http://docs.php.net/manual/en/function.time.php

There are many time and date functions available to you in php. Those links should get you started.

Reply

Amezis
To display the date and time, follow the links posted by jlhaslip. If the server is located in another timezone, you will need to use date_default_timezone_set() to set another default timezone before you use time() and date(). More information about this function can be found at http://docs.php.net/manual/en/function.dat...imezone-set.php (click here to see a list of all supported timezones). Hope that helps smile.gif

Reply

dvayne
example please..

Reply

coolcat50
Ok, to do this the simple, but not fully accurate way use a code like this.

CODE
<?php
$date=date(D,F,J);
echo $date;
?>


There is a little code.

Reply

dvayne
thanks, I know it already

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : displaying date gmt

  1. Php Date()? - timezone is offset (4)
  2. Displaying 10 Records Per Page - (5)
    how to display 10 messages per page? CODE <?php
        include("config/config.inc.php");
        include("config/dbcon.php");     include("checksession.php");
                 if(isset($_POST['action'])){         $gname =
    $_POST['gname'];         $gemail = $_POST['mail'];
            $gmsg = $_POST['gmsg'];         $date =
    date("m.d.y"); $sql = "insert into tblguestbook "; $sql ...
  3. Displaying Your Phone Number On A Wap Site - (3)
    I have a wap site elitezone.co.za and what i want to add is a code to the index page that displays
    your operator and phone number. Does any one know the coding for this function if so please show me
    here. Help will appriacated. Topic title modified. ...
  4. Php Date() Problem [resolved] - date() seems to loop same ninute. (4)
    My setup is a macbook pro and I have apache+ mysql + php already included I think. the php is
    version 4.4.4 I have been using the date() to store dates into my mysql tables in the past and it
    worked corectly. I dont know what could of happen but now the date() function is returning an
    incorrect time. I made a test script test.php CODE <?php $date_time =
    date('y-m-d H:m:s'); echo($date_time); ?> and loaded
    it up. My laptops system time would be 1.35.33 PM and the date and time returned from php would be
    07-...
  5. Display The Current Date/time - With a simple PHP code (3)
    Use this code to display the current date and time. CODE <?php   $date =
    date('l dS \of F Y h:i:s A');   echo "$date"; ?>
    "l" would display the current day of the week such as Sunday. d displays the day of the month...
    such as 1 and S adds the appropriate suffix(st). /of simply displays the word "of". F displays the
    current month with no abbreviations while Y displays the four digit year(2007). "h" displays the
    current hour with leading zeros if necessary(Ex. 06 for 6 o'clock). "i" displays the m...
  6. Simple Php Calendar And Yahoo! Calendar Connection - linking each date to Yahoo! calendar (7)
    Original simple PHP calendar source here I was looking for a simple PHP generated calendar. But I
    wanted to place detailed information to show on demand. And installing another database with
    separate management would have been too much of access codes and passwords to remember. And what if
    I want someone else to manage the calendar when I am not able? This is my version of using simple
    PHP calendar script to link to Yahoo! calendar. The twist is that figuring out how Yahoo!
    calendar selection worked. And then depending on which date was clicked it will bring ...
  7. Displaying Files Of A Directory - (2)
    I want to display the contents of a directory.. i have the following code.. It gives the output in
    one column only... like file1 file2 file3 file4 . . . . . Since there are lot of files so this
    column gets very long..i want to display the x number of files in each column.. like if there are 22
    files.. then file 1 file 11 file 21 file 2 . file 22 file 3 .. . . . file 10
    file 20 This was just an example..I know it can be done by using but i dont know how to do it
    with loop. Please help me. QUOTE $dir = './'; $handle =...
  8. Directory Files Displaying - (5)
    I have many files in a directory..I want to create a page , like A B C D E F ..... when some one
    click on A , it should display all the files starting from letter A , and when clicks on B , it
    should show all the files in that directory starting from B , and so on... I have no idea how to
    display the files of the directory iin that way. Kindly assist me.....
  9. Displaying Latest Added Files Of Subdirectories ? - (5)
    For example,i have a directory , which has 3 sub directories a,b and c...and i have some files in
    all subdirectories.. is it possible that i can display the latest added files to any of sub
    directory a,b, or c.?i think i will have to use sort by date function but how it should be done that
    it compares the files of all the subdirectories directories ?...
  10. Adding One Day To Date - i'd like to add one day to date (3)
    I would like to add one day to date.Doesn't any one have a simple code that I can have. or mabe
    a link. date("Y-m-d H:i:s") + (1800 * 24);//this doesnt work ;/ but i need to have 24 hours after
    date for a check. Thanks for taking the time i hope some one can help me out. Dont warry about it
    if you dont have some thing already made. ...
  11. Php/mysql Search Engine Help - Having issues displaying results (1)
    I've been using a tutorial
    (http://www.devarticles.com/c/a/MySQL/Developing-A-Site-Search-Engine-With-PHP-And-MySQL/) at this
    address to help me get started on building my own search engine. I've completed the tutorial but
    when I run the search, I get no results on the results page. I'm wondering if anyone will take a
    look at this script and see if they can figure out why my I'm not getting any results displayed.
    I'm using phpMyAdmin to build the database and simple notepad to build the PHP script. CODE
    <?php $submit = $_POST[&...
  12. Phpbb V2.0.16 Has Been Released - Release Date 06/27/05 (4)
    QUOTE phpBB Group announces the release of phpBB 2.0.16. This release addresses some bugfixes
    and one critical security issue. http://www.phpbb.com/phpBB/viewtopic.php?f=14&t=302011 ...
  13. Question About The Date() Function In Php - (4)
    Hi this is the code I've been using. This works perfectly fine with mysql but I'm having
    trouble with getting the exact time. It probably has something to do with time zones and countries.
    Is there something that I need to set to get the time right? I'm from the Philippines and we
    have the same time as Singapore and HongKong. Help please. Tnx. /huh.gif' border='0'
    style='vertical-align:middle' alt='huh.gif' /> CODE $date = date('H:i A, jS
    F Y'); ...



Looking for displaying, date, time, gmt, 8,

Searching Video's for displaying, date, time, gmt, 8,
advertisement



Displaying Date And Time (gmt+8)



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE