本文整理汇总了PHP中Time::getTimeZoneDateTime24方法的典型用法代码示例。如果您正苦于以下问题:PHP Time::getTimeZoneDateTime24方法的具体用法?PHP Time::getTimeZoneDateTime24怎么用?PHP Time::getTimeZoneDateTime24使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Time
的用法示例。
在下文中一共展示了Time::getTimeZoneDateTime24方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
echo " {$id} time server " . $mc->date_time;
//setting first day of the first time send required: dateTime
//get the specific timezone of the user
$timezone = $lookBookDatabase->getUserTimeZone($id);
echo "<br>this is time zone {$timezone} <br>";
//set timezone to get the time
$time->setTimeZoneDateTime($timezone);
//concat server date and send time
$dateTime = $time->concatDateAndTime($time->getTimezoneDate(), $time->getTimeRemoveDate($_GET['dateTime']));
echo "Send time " . $dateTime;
echo "Server Date Timezone = " . $time->getTimezoneDate();
//convert the time string send from the admin to date
$dateTime = date('Y-m-d H:i:s', strtotime($dateTime));
$location = 'BRISBANE';
//add dateTimeSend from 1 - 4 dates
$response = $time->addDateTmeSend($dateTime, $time->getTimeZoneDateTime24(), $id, $database, $invited_status);
}
} else {
$time->setTimeZoneDateTime($timezone);
//concat server date and send time
$dateTime = $time->concatDateAndTime($time->getTimezoneDate(), $time->getTimeRemoveDate($_GET['dateTime']));
echo "Send time " . $dateTime;
echo "Server Date Timezone = " . $time->getTimezoneDate();
//convert the time string send from the admin to date
$dateTime = date('Y-m-d H:i:s', strtotime($dateTime));
//add dateTimeSend from 1 - 4 dates
//people are not approved will be affected with this code they will be approved and set the time
$response = $time->addDateTmeSend($dateTime, $time->getTimeZoneDateTime24(), $id, $database, $location, $invited_status);
}
break;
default:
示例2:
if(mysql_query("DELETE FROM fs_test WHERE group_id NOT IN (SELECT max(id) FROM fs_test WHERE GROUP BY group_id); ")) {
echo "deleted ";
} else {
echo "not deleted";
}
echo "<div style='display:none'>";
Time::setTimeZoneDateTime('PHT');
echo 'Time' . Time::getTimeZoneDateTime12() . '<br>';
echo 'Time' . Time::getTimeZoneDateTime24() . '<br>';
echo 'Time' . Time::getTimeZoneLocation() . '<br>';
echo "date" . Time::getTimezoneDate() . '<br>';
// break;
// case 'MONTREAL':
// $url='http://www.timeanddate.com/worldclock/canada/montreal';
// $timezone='EST';
// break;
// $location = 'BANGKOK';
// $timezone='ICT';
// $url='http://www.timeanddate.com/worldclock/thailand/bangkok';
// $b = $db->update(
// 'fs_invited',
示例3: elseif
} elseif ($invited->getTotalEmailSent_() == 2) {
$dateTime = $date3 . ' ' . $invitedLocation->getLocationTime3();
echo "send new email v3 set date\n";
} else {
echo "\n else no send new email total sent is greater than 2 and value i" . $invited->getTotalEmailSent_();
}
$alert->alert("Date Time Send", $dateTime, " set = " . $dateTime . " \n");
echo "set time zone = " . Time::getTimeZoneDateTime24();
//send email
if (Time::getTimeZoneDateTime24() >= $dateTime) {
$alert->alert("\nAdd activity log", $invitedActivity->addActivityLog($qId, $action, $database), "set qId = {$qId} , action = {$action}");
echo "\n send email to invited ";
if (Email::sendInviteEmail($admin->getAdminEmail_(), 'mrjesuserwinsuarez@gmail.com', "Invited", $qId, $invited->getFirstName())) {
echo " email " . $invited->getEmail();
echo "\n send email to admin";
$newTotalSent = $invited->getTotalEmailSent_() + 1;
$alert->alert("\nUpdate total send email ", $invited->updateTotalEmailSent($iId, $invited->getTotalEmailSent_() + 1, $database), "set iId = {$iId} and last total email sent " . $invited->getTotalEmailSent_() . " new total email sent " . $newTotalSent);
} else {
echo "failed to send email " . __LINE__;
}
} else {
echo "<br> \n " . __LINE__ . ". ) time zone = " . Time::getTimeZoneDateTime24() . " is less than with date time db " . $dateTime;
}
} else {
echo "\n email will not received an invite because the totasent email is greater than 2 but " . $invited->getTotalEmailSent_();
echo "\n update queue status to 1";
}
// $database->update()
echo "\n---------------------------------------------------------------------------------------------------\n<br>";
$counter++;
}
示例4:
echo "set time zone = " . Time::getTimeZoneDateTime24();
//send email
//email version of sending
if (Time::getTimeZoneDateTime24() >= $dateTime) {
$alert->alert("\nAdd activity log", $invitedActivity->addActivityLog($qId, $action, $database), "set qId = {$qId} , action = {$action}");
echo "\n send email to invited <br>\n";
if (Email::sendInviteEmail3($admin->getAdminEmail_(), $invited->getEmail(), $email->inviteSubject1($invited->getTotalEmailSent_()), $qId, $invited->getTotalEmailSent_(), $invited->getFirstName())) {
echo " email " . $invited->getEmail();
echo "\n send email to admin";
$newTotalSent = $invited->getTotalEmailSent_() + 1;
$alert->alert("\nUpdate total send email ", $invited->updateTotalEmailSent($iId, $invited->getTotalEmailSent_() + 1, $database), "set iId = {$iId} and last total email sent " . $invited->getTotalEmailSent_() . " new total email sent " . $newTotalSent);
} else {
echo "failed to send email<br>\n";
}
} else {
echo "<br> \n " . __LINE__ . ". ) time zone = " . Time::getTimeZoneDateTime24() . " < " . $dateTime;
echo "<br>\n Email = " . $invited->getEmail();
}
} else {
echo "\n email will not received an invite because the totasent email is greater than 2 but " . $invited->getTotalEmailSent_();
echo "\n update queue status to 1";
if ($invitedQueue->updateQueueStatus($qId, 1, $database) == TRUE) {
echo "Email successfully update to queue.satatus = 1<br>";
} else {
echo "Email Failed update to queue.satatus = 1 <br>";
}
}
// $database->update()
echo "<br>\n---------------------------------------------------------------------------------------------------\n<br>";
$counter++;
}
示例5: sendInvitationToInvitedEmail
function sendInvitationToInvitedEmail($invitedInformation, $sc, $mc)
{
$totalDaysAllowedMax = 3;
// when the days passed by 3 days then the system will send an invite to the specific emails
$totalTimeAllowedMax = 0;
// when hours come and it should send if the hours remaining is between 2 - 0.
$totalTimeAllowedMin = 0;
// when hours come and it should send if the hours remaining is between 2 - 0.
$subject = 'An Invitation to Share Your Blog Content on Fashion Sponge';
// title of the invite email
$from = 'mauricio@fashionsponge.com';
//sender of the invite email
$type = 'invitations';
//email type dont change it
$totalEmailSentMLimit = 3;
//after 3 then the invited person should go to personal invite
$counter = 0;
$firstSentEmailTotalEmailSent = 0;
// set zero because if total email sent is zero then that is first time of sending the invitation
$firstSentEmailTotalDays = 1;
// set 1 because if the days passed is 1 day then the invitation email sent for the first time
$firstSentEmailTotalTime = 0;
// set zero because if the time is zero like 8:00 = 8:00 the and day is 1 then email will be sent for the first time.
for ($i = 0; $i < count($invitedInformation); $i++) {
//initialized data
$counter++;
$invited_id = $invitedInformation[$i]['invited_id'];
$invited_email = $invitedInformation[$i]['invited_email'];
$invited_fn = $invitedInformation[$i]['invited_fn'];
$DateTimeSend = $invitedInformation[$i]['DateTimeSend'];
$timezoneUrl = $invitedInformation[$i]['timezone_url'];
$temail_sent = $invitedInformation[$i]['temail_sent'];
$invited_status = $invitedInformation[$i]['invited_status'];
$location = $invitedInformation[$i]['location'];
$timezone = $invitedInformation[$i]['timezone'];
//notification send to admin when email clicked action
$action = 'Recieved Notification';
$to = 'mrjesuserwinsuarez@gmail.com,pecotrain1@gmail.com';
$subject1 = 'Invited person recieved email';
// 'invited person clicked the email content ' . $action;
$body = 'Full Name: ' . $invited_fn . "\n" . 'Email: ' . $invited_email . "\n" . 'Action: ' . $action . "\n" . 'Total Email Sent ' . $temail_sent;
$from1 = $invited_email;
$title = 'Fs Recieved Invitation';
$defaultLink = 'http://fashionsponge.com/';
//get timezone date time
//$locationDateTime = $sc->get_time_zone_time($timezoneUrl,$mc);
echo " timezone = {$timezone} ";
Time::setTimeZoneDateTime($timezone);
//server time send
$serverDate = Time::getDateRemoveTime($DateTimeSend);
$serverTime = Time::getTimeRemoveDate($DateTimeSend);
//timezone time
$locationDate = Time::getTimezoneDate();
//Time::getDateRemoveTime($locationDateTime);
$locationTime = Time::getTimeZoneTime24();
//Time::getFromTime12ToTime24(); // the set of the time is in the get_time_zone_time();
$locationTime1 = Time::getTimeZoneTime24();
//Time::getTimeRemoveDate($locationDateTime);
// echo " time location $locationTime <br> ";
// get total passed days
$totalPassedDays = Time::getTotalDaysPassed($serverDate, $locationDate);
//get time difference
Time::setTimeDifference($serverTime, $locationTime);
//variables declare
$this->setFirstName($invited_fn);
$this->setNewTotalEmailSent($temail_sent);
//validate information
$dateTimeValidadted = $this->validateDateAndTimeToSendInvitation($totalPassedDays, $totalDaysAllowedMax, Time::getTotalHours(), $totalTimeAllowedMax, $totalTimeAllowedMin, $firstSentEmailTotalEmailSent, $firstSentEmailTotalDays, $firstSentEmailTotalTime, $temail_sent);
if ($dateTimeValidadted === TRUE) {
if ($mc->send_email_signup_to_user(' ' . $this->getFirstName(), $invited_email, $type, $from, $subject)) {
echo "<b><h3> SUCCESSFULLY SENT EMAIL INVITE</H3>";
if (Program::emailInvitationClickedSaveActivityAndRedirectLocation($defaultLink, $action, $invited_email, FALSE, Program::$adminEmail, $subject1, $body, $from1, $title)) {
echo '<br>' . 'notification sent to Email sent to admins = ' . Program::$adminEmail . ' that new invitation sent to ' . $invited_email;
} else {
echo '<br>' . '<b> failled to send notifacation to the admins ' . Program::$adminEmail . ' that new invitation is sent to ' . $invited_email;
}
} else {
echo "<b><h3> FAILLED SENT EMAIL INVITE</H3>";
}
if (LookbookDataBase::updateTimeSendAndTotalEmailSent($this->getNewTotalEmailSent(), Time::getTimeZoneDateTime24(), "invited_id = {$invited_id}")) {
echo "<b><h3> LOCATION TIME AND TOTAL EMAIL SENT SUCCESSFULLY UPDATED </H3>";
} else {
echo "<b><h3> LOCATION TIME AND TOTAL EMAIL SENT FAILLED SENT EMAIL INVITE</H3>";
}
if (LookbookDataBase::ifExceedTotalSendEmailThenMovedToPersonalInvite($this->getNewTotalEmailSent(), $totalEmailSentMLimit, "invited_id = {$invited_id}")) {
echo "<b><h3> USER SUCCESSFULLY TO MOVED PERSONAL INVITED </H3>";
} else {
echo "<b><h3> USER FAILLED TO MOVED PERSONAL INVITED </H3>";
}
} else {
echo "<br> dont send invitation to email because validation of days and time is false";
//refuse semd invitation email
}
// echo " hourMinutes $hourMinutes minutes $minutes hours $hours";
echo "<br> \t \n\t\t\t\tnumber: {$counter} .) <br>\n\t\t\t\tecmail with: btag {$invited_email} <br>\n\t\t\t\tlocation: {$location} <br>\n\t\t\t\temail: {$invited_email}<br>\n\t\t\t\t<b>database time </b><br>\n\t\t\t\tdate: {$serverDate} <br>\n\t\t\t\ttime: {$serverTime} <br> \n\t\t\t\t<b>location</b><br>\n\t\t\t\tdate: {$locationDate} <br>\n\t\t\t\ttime: {$locationTime} or " . Time::$hour12 . " <br> \n\t\t\t\t<b>calculation</b><br> \n\t\t\t\ttotal passed days: {$totalPassedDays} <br>\n\t\t\t\ttotal passed time: " . Time::getTotalHours() . " <br>\n\t\t\t";
echo "<hr>";
}
}