Fix timezone related stuff
This commit is contained in:
parent
10d105abef
commit
e33bef7b21
@ -8,6 +8,7 @@ RUN docker-php-ext-install zip
|
|||||||
RUN pecl install xdebug-2.9.0 && docker-php-ext-enable xdebug
|
RUN pecl install xdebug-2.9.0 && docker-php-ext-enable xdebug
|
||||||
|
|
||||||
RUN echo "xdebug.remote_enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini;
|
RUN echo "xdebug.remote_enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini;
|
||||||
|
RUN echo "date.timezone = Europe/Warsaw" >> /usr/local/etc/php/conf.d/datetime.ini;
|
||||||
|
|
||||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
RUN php composer-setup.php
|
RUN php composer-setup.php
|
||||||
|
@ -60,7 +60,7 @@ class ZtmGdanskDepartureRepository implements DepartureRepository
|
|||||||
$lines = $this->lines->getManyById($lines)->keyBy(t\property('id'));
|
$lines = $this->lines->getManyById($lines)->keyBy(t\property('id'));
|
||||||
|
|
||||||
return collect($estimates)->map(function ($delay) use ($stop, $lines) {
|
return collect($estimates)->map(function ($delay) use ($stop, $lines) {
|
||||||
$scheduled = (new Carbon($delay['theoreticalTime'], 'Europe/Warsaw'))->tz('UTC');
|
$scheduled = (new Carbon($delay['theoreticalTime'], 'Europe/Warsaw'));
|
||||||
$estimated = (clone $scheduled)->addSeconds($delay['delayInSeconds']);
|
$estimated = (clone $scheduled)->addSeconds($delay['delayInSeconds']);
|
||||||
|
|
||||||
return Departure::createFromArray([
|
return Departure::createFromArray([
|
||||||
|
@ -11,7 +11,7 @@ class VersionExtension extends AbstractExtension
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
new TwigFunction('version', function () {
|
new TwigFunction('version', function () {
|
||||||
return substr(`git rev-parse HEAD`, 0, 8) ?: '0.2-dev';
|
return substr(`git rev-parse HEAD`, 0, 8) ?: '0.2';
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user