Set Date?

This is a discussion on Set Date? within the PHP Language forums, part of the PHP Programming Forums category; "Michael Willcocks" <michael@metrogroup.com.au> wrote in message news:3f7b745f$0$95042$c30e37c6@lon-reader....


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-02-2003
Randell D.
 
Posts: n/a
Default Re: Set Date?

"Michael Willcocks" <michael@metrogroup.com.au> wrote in message
news:3f7b745f$0$95042$c30e37c6@lon-reader.news.telstra.net...
> Can you tell PHP to set the date on your machine?
>
> Windows 2000 Pro
> Apache 1.3 & PHP 4
>
> Thx
>
>


Can you use the system() or exec() function on your box? If so, you might
be able to have it open a quick shell and set the time...


Reply With Quote
  #2 (permalink)  
Old 10-02-2003
Matthias Esken
 
Posts: n/a
Default Re: Set Date?

"Michael Willcocks" <michael@metrogroup.com.au> schrieb:

> <?php
> $strDate = date("m-d-y");
> $strTime = date("G:i:s");
>
> system ("date $strDate");
> system ("time $strTime");
> ?>
>
> that would do nothing, as it's justing setting to the date as it is anyway


Yes, of course. Have a look at the optional second parameter of the
date() function.

Regards,
Matthias
Reply With Quote
  #3 (permalink)  
Old 10-02-2003
Michael Willcocks
 
Posts: n/a
Default Set Date?

Can you tell PHP to set the date on your machine?

Windows 2000 Pro
Apache 1.3 & PHP 4

Thx


Reply With Quote
  #4 (permalink)  
Old 10-02-2003
Michael Willcocks
 
Posts: n/a
Default Re: Set Date?

Worked it out...
This would work

<?php
$strDate = date("m-d-y");
$strTime = date("G:i:s");

system ("date $strDate");
system ("time $strTime");
?>

that would do nothing, as it's justing setting to the date as it is anyway

thanks for your input


MW


"Randell D." <you.can.email.me.at.randelld@yahoo.com> wrote in message
news:u6Leb.2764$pl3.958@pd7tw3no...
> "Michael Willcocks" <michael@metrogroup.com.au> wrote in message
> news:3f7b745f$0$95042$c30e37c6@lon-reader.news.telstra.net...
> > Can you tell PHP to set the date on your machine?
> >
> > Windows 2000 Pro
> > Apache 1.3 & PHP 4
> >
> > Thx
> >
> >

>
> Can you use the system() or exec() function on your box? If so, you might
> be able to have it open a quick shell and set the time...
>
>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:10 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0