duandunzhuo3234 2015-05-21 15:21
浏览 77

将日期和时间转换为Laravel的Jalali

I want to change the time and date calendar to Jalali (Shamsi calendar used in Iran) in my system. How can I do this?

    "language_title" => "English",
    "dir" => "ltr", // ltr = left to right, rtl = right to left
    "language_code" => "en",
    "intl_locale" => "en_US",
    "dec_point" => ".",
    "thousands_sep" => ",",
    "dateformat_full" => "D, M j Y  g:i A", // http://php.net/manual/en/function.date.php
    "dateformat_date_long" => "D, M j Y", // http://php.net/manual/en/function.date.php
    "intl_dateformat_full" => "E, d MMM yy  h:m a", // http://userguide.icu-project.org/formatparse/datetime
    "intl_dateformat_date_long" => "E, d MMMM yyyy", // http://userguide.icu-project.org/formatparse/datetime

</div>
  • 写回答

4条回答 默认 最新

  • dongqiao9015 2015-05-21 16:19
    关注

    In your config/app.php file, you've to change the following setting :

    /*
    |--------------------------------------------------------------------------
    | Application Timezone
    |--------------------------------------------------------------------------
    |
    | Here you may specify the default timezone for your application, which
    | will be used by the PHP date and date-time functions. We have gone
    | ahead and set this to a sensible default for you out of the box.
    |
    */
    
    'timezone' => 'IST',
    

    Assuming that your timezone is IST :)

    评论

报告相同问题?

悬赏问题

  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?