 {ROOT, layout, _, $, $$, React, ReactBootstrap} = window
 {Panel, Table, Label, OverlayTrigger, Tooltip} = ReactBootstrap
 
-prevHours = (new Date()).getUTCHours()
-interval = null
+# Local time -> Task Refresh time(GMT + 4)
+getCurrentDay = ->
+  curTime = new Date()
+  curTime.setTime(curTime.getTime() + (curTime.getTimezoneOffset() + 240) * 60000)
+  curTime.getDay()
+
+prevDay = getCurrentDay()
 
 getType = (api_category) ->
   switch api_category

        detail:
          tasks: tasks
      window.dispatchEvent event
    prevHours = curHours
  handleTaskInfo: (e) ->
    {tasks} = e.detail
    @setState

  componentDidMount: ->
    window.addEventListener 'game.response', @handleResponse
    window.addEventListener 'task.info', @handleTaskInfo
    @interval = setInterval @refreshDay, 30000
  componentWillUnmount: ->
    window.removeEventListener 'game.response', @handleResponse
    window.removeEventListener 'task.info', @handleTaskInfo
    clearInterval @interval
  render: ->
    <Panel header="任务" bsStyle="success">
      <Table>
