Set the current date in PHP

Posted by Rowan on Stack Overflow See other posts from Stack Overflow or by Rowan
Published on 2010-06-01T09:46:16Z Indexed on 2010/06/01 9:53 UTC
Read the original article Hit count: 291

Filed under:
|
|

I'm currently working on my company's in-house CMS and wish to add the ability for an admin to view the site on a specific date. This will allow admins to preview the site with archived or scheduled posts.

I'd like to avoid finding all mentions of date() or time() and offsetting them. Is there a way of making PHP think it's a specific date so that all calls to date() default to the new time?

Thank you

© Stack Overflow or respective owner

Related posts about php

Related posts about date