sKunKbad Posted November 13, 2007 Share Posted November 13, 2007 I have a php4 script that uses date_default_timezone_set('GMT'); and I need the php4 equivalent because I'm converting the script to php4. Here is the script: // Set the time zone: date_default_timezone_set('GMT'); // Check for form submission. if (isset($_POST['submitted'])) { // Validate the credit card... // Check the expiration date: $year = (int) $_POST['cc_exp_year']; $month = (int) $_POST['cc_exp_month']; // Get the current date: $today = getdate(); // Validate the expiration date: if ( ($year > $today['year']) OR ( ($year == $today['year']) AND ($month >= $today['mon']) ) ) { // Include the class definition: require ('Validate/Finance/CreditCard.php'); // Create the object: $cc = new Validate_Finance_CreditCard(); // Validate the card number and type: if ($cc->number($_POST['cc_number'], $_POST['cc_type'])) { // Use XXX to process the order!!! // If payment goes through, complete the order! echo '<p>Your order is complete (but not really).</p>'; include_once ('./includes/footer.html'); exit(); } else { // Invalid card number or type. echo '<p class="error">Please enter a valid credit card number and type.</p>'; } } else { // Invalid date. echo '<p class="error">Please enter a valid expiration date.</p>'; } } Link to comment https://forums.phpfreaks.com/topic/77101-need-date_default_timezone_set-for-php4/ Share on other sites More sharing options...
trq Posted November 13, 2007 Share Posted November 13, 2007 There is no equivelent for php4. Link to comment https://forums.phpfreaks.com/topic/77101-need-date_default_timezone_set-for-php4/#findComment-390464 Share on other sites More sharing options...
sKunKbad Posted November 13, 2007 Author Share Posted November 13, 2007 Well... I don't see any reason why it must be in the script, so I just commented it out. Link to comment https://forums.phpfreaks.com/topic/77101-need-date_default_timezone_set-for-php4/#findComment-390466 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.