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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:42:47+00:00 2026-06-15T05:42:47+00:00

I have the following code date(D j M g a, strtotime($start)). – . date(ga,

  • 0

I have the following code

date("D j M g a", strtotime($start))." - " . date("ga", strtotime($finish));

`["Start"]=>
        string(21) "/Date(1354323600000)/"
        ["End"]=>
        string(21) "/Date(1354326300000)/"
      }`

The above code outputs Thu 1 Jan 12 pm - 12pm" string(22) "Thu 1 Jan 12 pm - 12pm in the correct format that I want but how could I get the day date and time correct.

Pacific/Auckland is my timezone

  • 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-15T05:42:48+00:00Added an answer on June 15, 2026 at 5:42 am

    The issue is that what you pass to the strtotime – /Date(1354323600000)/ string is not in a valid format for strtotime function.

    And actually it’s a regular unix timestamp in milliseconds.

    So the obvious solution – is to clean up everything but numbers and divide it by 1000:

    $unix_time_with_ms = preg_replace('~\D~', '', $date);
    echo date('Y-m-d H:i:s', $unix_time_with_ms / 1000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code to format dates: $date = new Zend_Date(); $date->set(strtotime($some_date); echo
I have the following code $time = strtotime(date('Y-m-d 00:00', strtotime(gmdate('Y-m-d H:i')) + 0)); Its
I have the following code: $ips = file_get_contents($_SERVER['DOCUMENT_ROOT']./visitors.txt); $arr = explode(,,$ips); $today = strtotime(date('Y-m-d
I currently have the following code $TimelineEvents[$i][Date] = date(F j, Y, strtotime($Date)); Which works
Say I have the following code: struct date { int day; int month; int
I have the following code: DECLARE @testDate date --SET @testDate=dateadd(wk, 5830, 0) SET @testDate='2011-09-26
i have the following code def get(self): date = datetime.date.today() loc_query = Location.all() last_cursor
I have the following table <thead> <tr> <th>Account ID</th> <th>Code</th> <th>Date Created</th> <th>Date Expires</th>
I have following code for updating user's column public void UpdateLastModifiedDate(string username) { using
I have the following code using date.js: <div id=Timer> <script>Date.parse(hh:mm);</script> <div class=Timers> <div class=timerSpace><span

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.