Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8775435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:47:52+00:00 2026-06-13T18:47:52+00:00

I am try this code <script> var rightNow = new Date(); var jan1 =

  • 0

I am try this code

<script> 
var rightNow = new Date();
var jan1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0);
var temp = jan1.toGMTString();
//document.hari.maliya.value=temp;
//alert(temp);
document.write(temp);
 <script>  

But i want in php file

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T18:47:54+00:00Added an answer on June 13, 2026 at 6:47 pm

    hi i solved this question answer :

    <script> 
    $(document).ready(function() {
        var rightNow = new Date();
        //alert(temp);
         document.harimaliya.timezone.value=rightNow;
    });
    </script>
    

    and html code is:

        <form name="harimaliya" id="harimaliya" action=""  method="post">
            time zone :<input type="text" name="timezone" id="timezone" value='' size="50"/> 
            <input type="submit" value="Test Diffrent time Zone" name="timezonetest" id="timezonetest">
        </form>
    

    PHP Code Calaculate diff between two Time Zone:

    <?php
        if(isset($_POST['timezonetest']))
          {
        echo "User Time Zone -:"." ".$usertimezone  = "(GMT-12:00)-International Date Line West";
        echo "<br>";
        $usertimezone = substr ($usertimezone, 1,9);
        echo $usertimezone= str_replace(':',"",$usertimezone);
        echo "<br>";
        echo date(strtotime("$usertimezone"));
        echo "<br>";
        echo "System Time Zone -:"." ".$systemtimezone= $_POST['timezone'];
        $systemtimezone = strstr($systemtimezone, 'G');
        echo "<br>";
        echo $systemtimezone = substr ($systemtimezone, 0,8);
        echo "<br>";
        echo date(strtotime("$systemtimezone"));
        echo "<br>";
        echo $diff=date(strtotime("$usertimezone"))-date(strtotime("$systemtimezone"));
        echo "<br>";
    
        echo $diff=($diff/60)." "."minits";
        echo "<br>";
        echo $diff=($diff/60);
        }
     ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: try { var _o, _l, i, _d = new Array(),
This code works: <canvas id=myCanvas width=578 height=200></canvas> <script> var canvas = document.getElementById('myCanvas'); var context
I have this action script code that is working perfectly but i am try
I'm using this code to submit a form to a php script: var valid
I want to catch a specific failure of this JavaScript code: var script =
Consider this code: <script type=text/javascript> if ('mySuperProperty' in window) { alert(window['mySuperProperty']); } var mySuperProperty
I am using this code: <script type=text/javascript> var id = <?php if(is_numeric($_GET['id'])) print $_GET['id'];
Look this code: <script type = text/javascript> function mouseClick (container) { container.appendChild (document.createTextNode (Can
hi have this code which works perfectly with just value: <script type=text/javascript> $(document).ready(function() {
Try <script type=text/javascript> var str=>1 people>9 people>1u people; document.write(str.match(/>.*people/img).length); </script> at http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_regexp_dot . This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.