sonata-project / SonataNewsBundle

[Abandoned] Symfony SonataNewsBundle
https://docs.sonata-project.org/projects/SonataNewsBundle
MIT License
151 stars 131 forks source link

Error Date format new Post page #466

Closed franckentien closed 4 years ago

franckentien commented 6 years ago

Environment

Sonata packages

sonata-project/admin-bundle              3.37.0 = 3.37.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.12.1 = 3.12.1 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  = 2.0.1  Cache library
sonata-project/classification-bundle     3.7.1  = 3.7.1  Symfony SonataClassificationBundle
sonata-project/core-bundle               3.11.2 = 3.11.2 Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.3.1  = 2.3.1  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.0.2  = 1.0.2  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.6.1  = 3.6.1  Symfony Sonata / Integrate Doctrine ORM into the SonataAdm...
sonata-project/easy-extends-bundle       2.5.0  = 2.5.0  Symfony SonataEasyExtendsBundle
sonata-project/exporter                  1.9.1  = 1.9.1  Lightweight Exporter library
sonata-project/formatter-bundle          3.5.0  = 3.5.0  Symfony SonataFormatterBundle
sonata-project/intl-bundle               2.5.0  = 2.5.0  Symfony SonataIntlBundle
sonata-project/media-bundle              3.15.0 = 3.15.0 Symfony SonataMediaBundle
sonata-project/news-bundle               3.5.0  = 3.5.0  Symfony SonataNewsBundle
sonata-project/user-bundle               4.2.3  = 4.2.3  Symfony SonataUserBundle

Symfony packages

symfony/monolog-bundle     v3.3.0  = v3.3.0 Symfony MonologBundle
symfony/phpunit-bridge     v3.4.13 ~ v4.1.2 Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.8.0  = v1.8.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-ctype     v1.8.0  = v1.8.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-icu  v1.8.0  = v1.8.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.8.0  = v1.8.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56     v1.8.0  = v1.8.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70     v1.8.0  = v1.8.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util      v1.8.0  = v1.8.0 Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.1  = v3.0.1 Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.7  ~ v3.2.2 Symfony SwiftmailerBundle
symfony/symfony            v3.4.13 ~ v4.1.2 The Symfony PHP framework

PHP version

PHP 7.1.9 (cli) (built: Aug 30 2017 18:34:46) ( ZTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

Subject

The publication date format was not the same between list of post and the edit page.

image

image

Steps to reproduce

I use a standard project and i have this config for internationalization

sonata_intl:
  timezone:
      default: Europe/Paris
      locales:
          fr:    Europe/Paris
          en_UK: Europe/London
      detectors:
          - sonata.intl.timezone_detector.user
          - sonata.intl.timezone_detector.locale

Expected results

I expect to have the same date but in my case I have 2 hours differences Maybe because my timezone was in GTM+2

Who can i have the same hours in the 2 pages ?

Thanks

core23 commented 5 years ago

I'm not sure if we can fix this, because there are two different solutions for date conversions. One fixed conversion while creating the HTML and one dynamic in the browser via JavaScript.

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.