Opened 16 years ago
Closed 15 years ago
#1280 closed defect (bug) (fixed)
_bb_time_function_return() ignores GMT offset
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 1.1 | Priority: | normal |
| Severity: | normal | Version: | 1.1-alpha |
| Component: | Locale - i18n/l10n | Keywords: | |
| Cc: |
Description
As title says, _bb_time_function_return() does not consider bbPress gmt_offset.
According to this page, _bb_time_function_return() is referenced 7 times in bbPress source: are we going to replace all those instances with bb_datetime_format_i18n() (or similar gmt_offset-aware) or just change _bb_time_function_return()'s behavior?
Attachments (3)
Change History (21)
#2
@
16 years ago
- Keywords has-patch tested added
bb_gmdate_i18n() call at line 3559 in functions.bb-template.php was missing the third arg, gmt: I set it to false and that's it. =)
#3
follow-up:
↓ 6
@
16 years ago
- Keywords has-patch tested removed
Weird.... my last patch setting "gmt" to false fixes search results time but wrecks front-page, forum and view last post time: my GMT is +2 and all last post times got +4 hours instead of -2, making some Freshness values go "-1 years"! :P
How is this possible??
#6
in reply to:
↑ 3
@
16 years ago
Quoting myself:
Weird.... my last patch setting "gmt" to false fixes search results time but wrecks front-page, forum and view last post time: my GMT is +2 and all last post times got +4 hours instead of -2, making some Freshness values go "-1 years"! :P
How is this possible??
The patch wrecks all other last post links, I warned you!
@
16 years ago
Fixes everything everywhere (related to time), also fixes implausible date feed error
#8
follow-up:
↓ 9
@
16 years ago
I have attached another patch. Though I have tested it many times with different time zones, more testing would be appreciated.
#9
in reply to:
↑ 8
@
16 years ago
Replying to GautamGupta:
I have attached another patch. Though I have tested it many times with different time zones, more testing would be appreciated.
I've just finished testing it and works great!
#11
follow-up:
↓ 13
@
16 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
The localize parameter has nothing to do with gmt offset. It's purpose is to tell bbPress weather or not to localize the time into the current language or not.
For a Japanese install, for example:
localize=false: Fri, 03 Sep 2010 20:33:40 +0000
localize=true: 金, 03 9 月 2010 20:33:40 +0000
This changeset breaks feeds. Reverting, reopening.
We need a new arg for this. gmt=true/false with false being the default? Note, though, that bb_since() requires a GMT time be based, so if format=since, we have to force gmt=true.
#13
in reply to:
↑ 11
;
follow-up:
↓ 16
@
16 years ago
- Keywords has-patch added
- Milestone changed from 1.0.3 to 1.1
Attached a patch based on mdawaffe's comment. Hope I understood it correctly...
Sorry, the correct page is this, the other is
bb_datetime_format_i18n()'s.