Fix time difference issue

This commit is contained in:
Mashiro 2018-06-16 23:30:41 +08:00
parent 5869acd7d2
commit 27831aae15
9 changed files with 9 additions and 9 deletions

View File

@ -379,7 +379,7 @@ if(!function_exists('akina_comment_format')){
</div>
<?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
<div class="right">
<div class="info"><time datetime="<?php comment_date('Y-m-d'); ?>"><?php echo poi_time_since(strtotime($comment->comment_date), true );//comment_date(get_option('date_format')); ?></time><?php echo siren_get_useragent($comment->comment_agent); ?><?php echo mobile_get_useragent_icon($comment->comment_agent); ?>&nbsp;来自: <?php echo convertip(get_comment_author_ip()); ?>
<div class="info"><time datetime="<?php comment_date('Y-m-d'); ?>"><?php echo poi_time_since(strtotime($comment->comment_date_gmt), true );//comment_date(get_option('date_format')); ?></time><?php echo siren_get_useragent($comment->comment_agent); ?><?php echo mobile_get_useragent_icon($comment->comment_agent); ?>&nbsp;来自: <?php echo convertip(get_comment_author_ip()); ?>
<?php if (current_user_can('manage_options') and (wp_is_mobile() == false) ) {
$comment_ID = $comment->comment_ID;
$i_private = get_comment_meta($comment_ID, '_private', true);

View File

@ -59,7 +59,7 @@ function get_random_bg_url(){
* 订制时间样式
* poi_time_since(strtotime($post->post_date_gmt));
* poi_time_since(strtotime($comment->comment_date_gmt), true );
* 不可使用GMT!!
* 如果中途修改过Linux系统时间则继续使用GMT可能出现时差问题!!
* poi_time_since(strtotime($post->post_date));
* poi_time_since(strtotime($comment->comment_date), true );
*/

View File

@ -23,7 +23,7 @@
<div class="works-overlay">
<h1 class="works-title"><a href="<?php the_permalink();?>"><?php the_title();?></a></h1>
<div class="works-p-time">
<i class="iconfont icon-calendar"></i> <?php echo poi_time_since(strtotime($post->post_date));//the_time('Y-m-d');?>
<i class="iconfont icon-calendar"></i> <?php echo poi_time_since(strtotime($post->post_date_gmt));//the_time('Y-m-d');?>
</div>
<div class="works-meta">
<div class="works-comnum">

View File

@ -23,7 +23,7 @@
<?php if(is_sticky()) : ?>
<i class="iconfont hotpost icon-hot"></i>
<?php endif ?>
<i class="iconfont icon-time"></i><?php echo poi_time_since(strtotime($post->post_date));//the_time('Y-m-d');?>
<i class="iconfont icon-time"></i><?php echo poi_time_since(strtotime($post->post_date_gmt));//the_time('Y-m-d');?>
</div>
<p><?php echo mb_strimwidth(strip_shortcodes(strip_tags(apply_filters('the_content', $post->post_content))), 0, 150,"...");?></p>
<footer class="entry-footer">

View File

@ -13,7 +13,7 @@
<?php if(akina_option('patternimg') || !get_post_thumbnail_id(get_the_ID())) { ?>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date)); ?>&nbsp;&nbsp;<?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 次阅读</p>
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date_gmt)); ?>&nbsp;&nbsp;<?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 次阅读</p>
<hr>
</header><!-- .entry-header -->
<?php } ?>

View File

@ -22,7 +22,7 @@
<?php if(is_sticky()) : ?>
<i class="iconfont hotpost icon-hot"></i>
<?php endif ?>
<i class="iconfont icon-time"></i><?php echo poi_time_since(strtotime($post->post_date));//the_time('Y-m-d');?>
<i class="iconfont icon-time"></i><?php echo poi_time_since(strtotime($post->post_date_gmt));//the_time('Y-m-d');?>
</div>
</div>
<footer class="entry-footer">

View File

@ -30,7 +30,7 @@ $the_cat = get_the_category();
<div class="post-content-wrap">
<div class="post-content">
<div class="post-date">
<i class="iconfont icon-time"></i><?php echo poi_time_since(strtotime($post->post_date)); ?>
<i class="iconfont icon-time"></i><?php echo poi_time_since(strtotime($post->post_date_gmt)); ?>
<?php if(is_sticky()) : ?>
&nbsp;<i class="iconfont hotpost icon-hot"></i>
<?php endif ?>

View File

@ -22,7 +22,7 @@
<?php if(is_sticky()) : ?>
<i class="iconfont hotpost icon-hot"></i>
<?php endif ?>
<i class="iconfont icon-time"></i><?php echo poi_time_since(strtotime($post->post_date)); ?>
<i class="iconfont icon-time"></i><?php echo poi_time_since(strtotime($post->post_date_gmt)); ?>
</div>
<?php the_excerpt(); ?>
<footer class="entry-footer">

View File

@ -15,7 +15,7 @@
<?php the_post_thumbnail('full'); ?>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date)); ?>&nbsp;&nbsp;<?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 次阅读</p>
<p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date_gmt)); ?>&nbsp;&nbsp;<?php echo wp_statistics_pages('total','uri',get_the_ID()); ?> 次阅读</p>
<hr>
</header>
</div>