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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:44:28+00:00 2026-05-30T11:44:28+00:00

I have a system running in PHP and am using CodeIgniter (if there is

  • 0

I have a system running in PHP and am using CodeIgniter (if there is a CI specific answer to this I would be happy as well).

I often need to figure out the timestamp of dates such as “this Thursday” or “this Monday”. I currently use strtotime("this Thursday") and it gives me what I ask for.

I have a server in EST. It is 01:00 (1:00am), early morning Friday, Feb 24, 2012 in New York.

I have a user who has specified his timezone to be Pacific time. Right now it is 22:00 (10pm) late evening Thursday Feb 23, 2012 in San Francisco.

I use strtotime("this Thursday"). Since my server is in EST, it returns me the timestamp for March 1, 2012. I would like to take the user’s timezone into consideration. For my user, “this Thursday” should return Feb 23, 2012.

Can I use strtotime("this Thursday") for it, and if so, how would I specify the target timezone?

If not, what approach would you suggest to getting the date for “this Thursday” in a specific 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-05-30T11:44:30+00:00Added an answer on May 30, 2026 at 11:44 am

    I just figured out that strtotime takes a $now parameter. I can specify the $now param to be the current time in the user’s timezone and strtotime returns me what I need.

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

Sidebar

Related Questions

I have a PHP app running happily on the following system: web app: PHP
I have an Apache2/mod_perl2 system up and running. I'm using GD to create an
I have a Perl/POE/Tk script running on Win32 ActivePerl that calls executables using system
I have an exe file that I'm calling through php using the 'system' command.
I have an exe file that I'm calling through php using the 'system' command.
I have a developer tool that modifies the local file system using php. These
We have a system that has some Bash scripts running besides Java code. Since
I have an embedded system (ARM 9263) running an RTOS, IAR tools. The system
I am looking to implement a continuous unit test running system, something I have
I have a J2EE-based system which is running currently on Apache Tomcat. We are

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.