I created a content type named Event and, obviously, with the event date field. After some nodes were created, the standard SmartDate format displays a different time within the parentheses, where I didn't find out where to change or delete this. I created a new date format using d M, however, after the date and month been displayed, there came again the parentheses, but this time with no content inside. Actually, I don't need any parentheses. I also noticed that the content within the parentheses changes according to some browsers, but the node(id) is the same. I attached some images. What am I doing wrong?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | smart_date-site_timezone_display-3170559-4.patch | 983 bytes | mandclu |
| smartdate-dM-format.png | 2.91 KB | pharamis | |
| smartdate-default-format-firefox.png | 8.41 KB | pharamis | |
| smartdate-default-format-chrome.png | 12.39 KB | pharamis |
Comments
Comment #2
mandclu commentedThe parentheses are meant to show the time for an event in the site's timezone, if the event's timezone is different. I believe this isn't enabled by default in the provided Smart Date formats:

That said, it probably shouldn't display them at all if there's no output, and it should only show if the event timezone is different from the user or site timezone. Do you have timezone's explicitly set for the event, or perhaps the field? I would be interested to know what values you're using, especially for the example where it's showing but the same inside the parentheses.
As for showing different values per browser, is there a difference between browsers of whether or not you are logged in?
Comment #3
pharamis commentedHi mandclu,
I am currently using the 8.x-2.9 version. After downloading the 3.0.0-rc1, 8.x-1.2 and 8.x-2.x-dev versions I noticed that the 3.0.0-rc1 is the only one which has the option shown at the attached image. I usually go for the version with the shield(Stable release covered by the Drupal Security Team). Are there any plans on releasing the option "Site Time" display for the Stable release?
As for showing different values per browser within the parentheses, I found out that only happens when the user is logged in. But according to the regional settings, the option "Users may set their own time zone" is unchecked. So, a peculiar behaviour.
Thank you for your fast response.
Comment #4
mandclu commentedThe attached patch should help handle some of the oddities you ran into. Please test and let me know if this resolves them for you.
As for having the setting available in a stable release, at this point I'm probably more inclined to create a stable release of the 3.0.x branch, possibly as soon as we can get this issue resolved.
Comment #5
pharamis commentedI applied the patch, but ran into a failure message.
root#: patch -p1 < smart_date-site_timezone_display-3170559-4.patch
patching file src/SmartDateTrait.php
Hunk #1 FAILED at 82.
1 out of 1 hunk FAILED -- saving rejects to file src/SmartDateTrait.php.rej
Comment #6
mandclu commentedWere you applying the patch against the 3.0.x-dev release (or possibly 3.0.0-rc1)?
Comment #7
pharamis commentedI am applying the patch against 8.x-2.9 version(stable release). That's the one I am currently using.
Comment #9
mandclu commentedMerged the changes into a new, stable 3.0.0 release. This should be resolved, but feel free to reopen if you continue to have issues.
Comment #10
pharamis commentedThank you mandclu! It's fine now!