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

  • Home
  • SEARCH
  • 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 8602481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:05:46+00:00 2026-06-12T02:05:46+00:00

Well, not sure whats going on. I have been trying to follow by examples

  • 0

Well, not sure whats going on. I have been trying to follow by examples I have found here on stack, on google, even an answer someone gave me a week+ ago, which unfortunately I wasn’t able to test until today.

Anyway I am attempting to generate a javascript friendly timestamp via php so I can get my times synced up. The best logic I could find overall was something dealing with microtime. However that doesn’t seem to work as expected, not even in the slightest.

Right now I am using microtime(true)*1000; and am getting 1.34899651119E+12 for the result. Did I some how manage to mess up that one tiny line of code, Im not sure.

I should mention that I also tried round(microtime(true) * 1000); which gave very similar results.

  • 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-12T02:05:48+00:00Added an answer on June 12, 2026 at 2:05 am

    Your code is returning 1349000021801.4 to me (PHP 5.3.15 on Linux 3.4.6 x86_64).

    To be on the safe side I’d bite the bullet and manipulate the microtime differently:

        list($a, $b) = explode(' ', microtime());
        $a = round($a*1000.0);
        $c = "$b$a\n";
    

    When you output this string to Javascript, it will contain a “clean” integer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following script that works well in Firefox and Chrome (not sure
I'm not sure if I phrased my question as well as I liked to
I'm not sure that title is worded very well, but not sure how else
My question is probably not well phrased and it's probably a dupe but here
Suppose i have the code snippet as follows : ( clarification purpose/not well formed
I need to use basic javascript here and I'm not well versed with it.
I've been getting parser error with message The server tag is not well formed
I've been working on implementing an api in c#. The implementation is going well,
I've been trying to find a solution to this, but perhaps I'm not understanding
This is a strange issue and not sure what is going on. I am

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.