Display PST and not UTC
Brock Anderson created the topic: Display PST and not UTC
Th events in our events countdown widget is displaying the UTC. How do I correct this?
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Agapi G. replied the topic: Display PST and not UTC
Hello Brock!
Thanks for the request!
Unfortunately the add-on does not have a default option to change this, but we can make a small customization for you and change it to PST.
Please give us temporary WordPress admin access, our developers will take a look and make the changes as soon as possible. You can send the info using
this contact form
.
Also make sure to include the link to this forum thread in your message.
Thank you! Enjoy the weekend!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
Our site is hosted as an internal site so you won't be able to get access unless you're on our network. Any way they could just create a .zip file of the plugin with PST and I could add that? It's weird that the WD calendar lets you change your timezone and then the countdown widget for the event you just created is in UTC. The countdown widget in that case isn't really an accurate countdown to any event. Thanks!
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Agapi G. replied the topic: Display PST and not UTC
Hi Brock!
That will surely be possible! However, could you please open a support ticket using
this form
in any case? We will need the ticket to send the customized package to you.
Thanks in advance! Have a great day!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
7 years 3 months ago
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Agapi G. replied the topic: Display PST and not UTC
Hi Brock!
Our developers just got back to me with their response. The changes are very simple, so they have sent instructions for changing UTC to PST. Please open /ecwd.countdown.widget/shortcode.php file, scroll down to line 44 and replace this line:
$markup .= ' (UTC ' . $diff . ')';
with the following:
$markup .= ' (PST' . $diff . ')';
Also open /ecwd.countdown.widget/widgets.php file, go to line 76 and replace this:
$markup .= ' (UTC ' . $diff . ')';
with this code:
$markup .= ' (PST ' . $diff . ')';
Let me know if it works.
Thanks! Have a great day!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
The title changed to the PST but the widget itself is still counting down from UTC time.
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Agapi G. replied the topic: Display PST and not UTC
Thank you for checking, Brock!
I have notified our developers about this problem. They will check soon and get back with a better solution.
Thanks! Have a great day!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
7 years 3 months ago
Agapi G. replied the topic: Display PST and not UTC
Hey Brock!
Did you make sure to change the timezone of your Countdown add-on and set it to your timezone? Please note, that there are two different timezone options in Event Calendar WD and Countdown add-on. Set them both to your timezone.
Thanks! Have a great day!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
Are you referring to the editor files? Or the settings on the plugin? If that's the case then yes as far as I can tell yes we tried that.
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
Here's the .php code I've edited with pst switched out
<?php
/**
* Shortcodes
*/
/**
* [ecwd_countdown] shortcode
*/
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
function ecwd_countdown_shortcode( $attr ) {
extract( shortcode_atts( array(
'eid' => null,
'title' => null,
'date' => null,
'location' => null,
'finish_text' => null,
'theme_id' => null,
), $attr, 'ecwd_countdown' ) );
$markup = '';
if ( empty( $eid ) ) {
if(!empty($date)) {
global $ecwd_options;
$date_format = 'Y-m-d';
$time_format = 'H:i';
if ( isset( $ecwd_options ) && $ecwd_options != '' ) {
$date_format = $ecwd_options;
}
if ( isset( $ecwd_options ) && $ecwd_options != '' ) {
$time_format = $ecwd_options;
}
$pst = gmdate( "Y-m-d H:i:s" );
$currentpst = date( 'Y-m-d H:i:s' );
$diff = ( strtotime( $currentpst ) - strtotime( $pst ) ) / 60 / 60;
$start = date( 'Y/m/d H:i:s', strtotime( $date ) );
if ( strtotime( $start ) > strtotime( date( 'Y/m/d H:i:s' ) ) ) {
$markup = '<div class="ecwd_countdown_container">';
$markup .= '<div class="ecwd_countdown_info">';
$markup .= '<div class="ecwd-date">';
$markup .= '<span class="metainfo">' . date( $date_format . ' ' . $time_format, strtotime($date ));
if($diff) {
$markup .= ' (PST ' . $diff . ')';
}
$markup .= '</span>';
$markup .= '</div>';
$markup .= '<div class="info">';
$markup .= '<span>' . $title . '</span>';
$markup .= '<span>' . $location . '</span>';
$markup .= ' </div>';
$markup .= '<div class="clear"></div>';
$markup .= ' </div>';
$markup .= '<div class="ecwd_countdown">';
$markup .= '<input type="hidden" name="ecwd_start_time" value="' . date( 'Y/m/d H:i:s' ) . '"/>';
$markup .= '<input type="hidden" name="ecwd_end_time" value="' . $start . '"/>';
$markup .= '<input type="hidden" name="ecwd_timezone" value="'.$diff.'"/>';
$markup .= '<input type="hidden" name="ecwd_text_days" value="' . __('DAYS', 'ecwd') . '"/>';
$markup .= '<input type="hidden" name="ecwd_text_hours" value="' . __('HOURS', 'ecwd') . '"/>';
$markup .= '<input type="hidden" name="ecwd_text_minutes" value="' . __('MINUTES', 'ecwd') . '"/>';
$markup .= '<input type="hidden" name="ecwd_text_seconds" value="' . __('SECONDS', 'ecwd') . '"/>';;
$markup .= '<input type="hidden" name="ecwd_finish_text" value="' . $finish_text . '"/>';
if ( $theme_id ) {
$theme = get_post_meta( $theme_id, 'ecwd_countdown_theme', true );
$markup .= '<textarea class="hidden" name="ecwd_theme">' . $theme . '</textarea>';
}
$markup .= '<div class="clear"></div>';
$markup .= '</div>';
$markup .= '</div>';
$markup .= '<div class="clear"></div>';
}
}
} else {
if ( function_exists( 'ecwd_print_countdown' ) ) {
$markup = ecwd_print_countdown( $eid, 0, $theme_id, array('finish_text'=>$finish_text) );
}
}
return $markup;
}
add_shortcode( 'ecwd_countdown', 'ecwd_countdown_shortcode' );
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Agapi G. replied the topic: Display PST and not UTC
Hello Brock!
Thank you for the code, but unfortunately our developers are not able to figure out a solution without taking a look at the issue from front-end of your website, at least.
Could you please temporarily publish your website to a test server, where we can check the problem? Please note, that any sensitive information you provide is secured by our strong Privacy Statement. Feel free to look at it, if you'd like:
goo.gl/6QtQhh
You can send the login information privately using
this form
. Make sure to mention the link to this forum topic in your message.
Thanks! Have a wonderful day!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
Is there somebody I can contact? We can't publish this site on any other server. If it's an easy fix can't the developers just send me a .zip file of the plugin that will display PST? The plugin appears to be coded for UTC and that's not helpful any client aside from UTC. It would be one thing the plugin was free but we paid for it so I'm a little frustrated that something like a timezone is affecting us.
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
All that we want is for the countdown plugin to countdown from the event we created from your calendar plugin. It seems like anybody that downloads the countdown widget would want the same thing. It seems useless without the two working together.
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
I'm sorry I'm just confused on why the plugin doesn't countdown correctly. I don't see why your team would need access when the only problem is the countdown widget plugin doesn't work properly to begin with.
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
I messed around with plugin editor and stared changing java script on the time format. So I believe the problem should be solved. Im saving this code because I'm guessing it will break on future updates.
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Brock Anderson replied the topic: Display PST and not UTC
Please Log in or Create an account to join the conversation.
- Topic Author
- Brock Anderson
- Offline
- Fresh Boarder
- Posts: 16
- Thank you received: 0
7 years 3 months ago
Agapi G. replied the topic: Display PST and not UTC
Hey Brock!
Did the changes resolve the problem? I have asked our developers to take a look at your code just in case, and also to consider this problem as a bug in Countdown add-on.
Hopefully they will figure out a solution and release an update. However, please do keep the modified files until this version comes out.
Thanks! Have a wonderful day!
Kind regards,
Agapi G.
Web-Dorado team
Please Log in or Create an account to join the conversation.
7 years 3 months ago