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 1001125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:37:11+00:00 2026-05-16T07:37:11+00:00

In most of the Programming or scripting language such as PHP or JavaScript, i

  • 0

In most of the Programming or scripting language such as PHP or JavaScript, i have come across the time function which tends to calculate the time from year 1970. for example in javascript if i use the function getTime() or in PHP the time() it returns an integer value.

In PHP.

the code with <?php echo time(); ?> returns an integer value of 1281694425,
what does the value returned by the PHP explains? how and when it is useful?

the same in javascript the getTime() returns the float value since 1970 as it says. by using the below script in JS

<script type="text/javascript">
var d=new Date();
document.write(d.getTime() + " milliseconds since 1970/01/01");
</script>

i want to know when is this type of functions useful to use? and how do we use it?

P.S: is it useful for calculating the time interval? or it is used for storing the current time stamp?

  • 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-05-16T07:37:12+00:00Added an answer on May 16, 2026 at 7:37 am

    It give you the seconds which passed by since the 1st January 1970. This is useful fore several reasons:

    1. Sorting of dates is as simple as sorting integers.
    2. Its easy to get the length of an interval, simple do t1-t2 and you get the difference in seconds again.
    3. No need to handle different date-formats (like MM/DD/YY or DD/YY/MM): Every programming language and every database supports integers.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 497k
  • Answers 497k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer By default proxy doesn't use message contracts so when you… May 16, 2026 at 11:56 am
  • Editorial Team
    Editorial Team added an answer You can use a TreeSet with a custom Comparator<Book>: construct… May 16, 2026 at 11:56 am
  • Editorial Team
    Editorial Team added an answer Well anyone can modify static field and they will see… May 16, 2026 at 11:56 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

i have some clarification regarding Qt programming. In Qt most of the time we
Note: Although my particular context is Objective-C, my question actually transcends programming language choice.
Duplicate of: Learning to write a compiler Documentation on creating a programming language Learning
As far as I understood it, BigInts are usually implemented in most programming languages
Does anybody know of a website that lists new scripting/programming languages (or old ones)?
Is it possible to use include files in R like in most programming languages,
OOP is probably the most used programming paradigm in today’s software design. My question
I currently use Python for most of my programming, but I'm interested in learning
Friends i am new to cocos2d programming and Mac in general! I have noticed
I have recently started moving into the world of Linux development. I wanted to

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.