# 主题计时器对 fa\_IR 区域设置无效

**URL:** https://meta.discourse.org/t/topic-timer-doesnt-work-for-fa-ir-locale/83702
**Category:** Bug
**Tags:** topic-timers
**Created:** [2018年三月24日 05:50 UTC](https://meta.discourse.org/t/topic-timer-doesnt-work-for-fa-ir-locale/83702 "2018-03-24T05:50:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [2018年三月24日 05:50 UTC](https://meta.discourse.org/t/topic-timer-doesnt-work-for-fa-ir-locale/83702/1 "2018-03-24T05:50:09Z")

</div>

topic timer doesn’t work when using fa\_IR locale. i.e. nothing happen if I choose the topic to close after 1 day in these locales.

but when I set a timer in English locale, and then change the locale to fa\_IR, the timer works fine.

it behaves the same way as this previous bug: [Suspend doesn't work for Persian language](https://meta.discourse.org/t/suspend-doesnt-work-for-persian-language/81509). and I don’t get any error in /log.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2018年三月25日 23:57 UTC](https://meta.discourse.org/t/topic-timer-doesnt-work-for-fa-ir-locale/83702/2 "2018-03-25T23:57:11Z")

</div>

@techapj can you have a quick look at this?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2018年三月26日 02:54 UTC](https://meta.discourse.org/t/topic-timer-doesnt-work-for-fa-ir-locale/83702/3 "2018-03-26T02:54:15Z")

</div>

Ooo this is tricky. `moment.format` takes into account of the current locale and for certain locales the output is not something the server expects. Fixed in

[https://github.com/discourse/discourse/commit/252e58dfe995aff51fc15ba2541303a3b4b55988](https://github.com/discourse/discourse/commit/252e58dfe995aff51fc15ba2541303a3b4b55988)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2018年三月26日 03:37 UTC](https://meta.discourse.org/t/topic-timer-doesnt-work-for-fa-ir-locale/83702/4 "2018-03-26T03:37:26Z")

</div>

I also made sure we raise a proper error when the server receives an invalid timestamp

[https://github.com/discourse/discourse/commit/3d18cd1d9da2b236f9e25a5dced69f241d38789e](https://github.com/discourse/discourse/commit/3d18cd1d9da2b236f9e25a5dced69f241d38789e)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [2018年三月27日 10:00 UTC](https://meta.discourse.org/t/topic-timer-doesnt-work-for-fa-ir-locale/83702/5 "2018-03-27T10:00:03Z")

</div>

This topic was automatically closed after 31 hours. New replies are no longer allowed.
