V
V
Vyacheslav Yashnikov2016-08-31 10:10:33
MODX
Vyacheslav Yashnikov, 2016-08-31 10:10:33

Why on the mdx revo site the news on the main page is displayed with the date January 01, 1970 03:00?

Good afternoon, tell me why the news is displayed with such a date on the main page of the site http://romanov2016.rf/#news ? Although how is it here http://romanov2016.rf/news/ everything is fine? I withdraw through


Date in MainNews chunk 2022-05-18 11:53:00
snippet dateRU
<?php
$month_arr = array('01' => 'Января',
               '02' => 'Февраля',
               '03' => 'Марта',
               '04' => 'Апреля',
               '05' => 'Мая',
               '06' => 'Июня',
               '07' => 'Июля',
               '08' => 'Августа',
               '09' => 'Сентября',
               '10' => 'Октября',
               '11' => 'Ноября',
               '12' => 'Декабря'
              );

$time = strtotime($input);
$month = strftime('%m', $time);
$day = strftime('%d', $time);
$year = strftime('%Y', $time);
$hour = strftime('%R', $time);

return "$day $month_arr[$month] $year года $hour";

I tried to display the date without this snippet, just through
Wed May 18, 2022
Displays the same thing

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Yashnikov, 2016-08-31
@VyacheslavY

did this - it works

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question