[/CODE] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => 123polis123 [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> I want to insert local time & date in my site - Macromedia Dynamic HTML

I want to insert local time & date in my site - Macromedia Dynamic HTML

Wednesday 25 May 2008 | 13:01 GMT+2 | Cyprus-EU I want to insert local time & date in my site , well zone is GMT+2 , below is correct for date , what about time ? Code: <script language="JavaScript" type="text/javascript"><!-- var months = new Array("Jan", "Feb", "Mar","Apr", "May", "Jun", "Jul","Aug", "Sep", "Oct","Nov", "Dec") var weekdays = new Array("Sunday", "Monday", "Tuesday","Wednesday", "Thursday","Friday", "Saturday") var today = new Date() //--> </script> <script language="JavaScript" type="text/javascript"><!-- // Today is Weekday, Month Day, Year doent.write(weekdays[today.getDay()], ", ",months[today.getMonth()], " ",today.getDate(), ", ",today.getFullYear()) //--> </script>...

  1. #1

    Default I want to insert local time & date in my site

    Wednesday 25 May 2008 | 13:01 GMT+2 | Cyprus-EU
    I want to insert local time & date in my site , well zone is GMT+2 , below is
    correct for date , what about time ?

    Code:
    <script language="JavaScript" type="text/javascript"><!--
    var months = new Array("Jan", "Feb", "Mar","Apr", "May", "Jun", "Jul","Aug",
    "Sep", "Oct","Nov", "Dec")
    var weekdays = new Array("Sunday", "Monday", "Tuesday","Wednesday",
    "Thursday","Friday", "Saturday")
    
    var today = new Date()
    //-->
    </script>
    
    
    <script language="JavaScript" type="text/javascript"><!--
    // Today is Weekday, Month Day, Year
    doent.write(weekdays[today.getDay()], ", ",months[today.getMonth()], "
    ",today.getDate(), ", ",today.getFullYear())
    //-->
    </script>
    123polis123 Guest

  2. #2

    Default Re: I want to insert local time & date in my site

    this is correct for a visitor to my site anywhere is, get gmt+2 time ?

    Code:
    <script type="text/javascript">
    
    var d = new Date();
    // gmt=d.toUTCString();
    // doent.write (d.toUTCString());
    var d_gmt2_millisec = new Date(valueOf(d.toUTCString())+60*60*1000*2);
    doent.write(d_gmt2_millisec.toString());
    </script>
    123polis123 Guest

  3. #3

    Default Re: I want to insert local time & date in my site

    This is correct(js) ?

    Code:
    <script type="text/javascript">
    
    var d = new Date();
    gmt=d.toUTCString();    // get  GMT Time/date
    // doent.write (d.toUTCString());
    var gmt2ms = new Date(gmt.valueOf()+60*60*1000*2); // add two hours in ms
    doent.write(gmt2ms.toString());  //  write date as Sun, 25 May 2008
    14:19:30
    </script>
    What the
    x.valueOf()
    x.toString()
    do ?

    123polis123 Guest

Similar Threads

  1. Insert ODBC Date time values
    By TheToe in forum Coldfusion Database Access
    Replies: 0
    Last Post: December 12th, 10:08 PM
  2. Users local date/time
    By RobGT in forum Dreamweaver AppDev
    Replies: 4
    Last Post: April 27th, 08:46 AM
  3. local date/time.
    By Andrew Hardy in forum Informix
    Replies: 1
    Last Post: November 7th, 05:07 PM
  4. SQLserv. I want to INSERT time, without date HELP
    By Joe Resudek in forum ASP Database
    Replies: 3
    Last Post: August 7th, 05:15 PM
  5. ASP Insert Date & Time Problem
    By Nicolae Fieraru in forum ASP
    Replies: 2
    Last Post: August 5th, 11:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139