zoukankan      html  css  js  c++  java
  • .Net Core 3.1 控制器传入时间问题导致

    一、时间格式loca格式   "2020-10-21 12:48:04" 识别不了

    curl --location --request POST 'http://localhost:5100/Order/Create' 
    --header 'accept: text/plain' 
    --header 'Content-Type: application/json' 
    --data-raw '{"ExpressId":0,"BillCode":"string","TenantId":0,"CompanyId":0,"StationId":0,"Kind":1,"SubStatus":0,"LinkOrderId":0,"CreateUser":"string","CreateUserId":0,"CreateTime":"2020-10-21 12:48:04","Remark":"string","PickupCode":"string","DeviceId":0,"DeviceCode":"string","SubDeviceId":0,"CellId":0,"CellCode":"string","CellType":0,"BusinessOrderId":0}
    
    '

    二、时间格式UTC的 "2020-10-21 04:50:51 UTC" 识别不了

    curl --location --request POST 'http://localhost:5100/Order/Create' 
    --header 'accept: text/plain' 
    --header 'Content-Type: application/json' 
    --data-raw '{"ExpressId":0,"BillCode":"string","TenantId":0,"CompanyId":0,"StationId":0,"Kind":1,"SubStatus":0,"LinkOrderId":0,"CreateUser":"string","CreateUserId":0,"CreateTime":"2020-10-21 04:50:51 UTC","Remark":"string","PickupCode":"string","DeviceId":0,"DeviceCode":"string","SubDeviceId":0,"CellId":0,"CellCode":"string","CellType":0,"BusinessOrderId":0}
    '

    三、时间格式 "2020-10-21T04:39:56.921Z" 可行的

    curl --location --request POST 'http://localhost:5100/Order/Create' 
    --header 'accept: text/plain' 
    --header 'Content-Type: application/json' 
    --data-raw '{"expressId":0,"billCode":"string","tenantId":0,"companyId":0,"stationId":0,"kind":1,"subStatus":0,"linkOrderId":0,"createUser":"string","createUserId":0,"createTime":"2020-10-21T04:39:56.921Z","remark":"string","pickupCode":"string","deviceId":0,"deviceCode":"string","subDeviceId":0,"cellId":0,"cellCode":"string","cellType":0,"businessOrderId":0}
    '

    这三种

  • 相关阅读:
    19.2.15 [LeetCode 80] Remove Duplicates from Sorted Array II
    19.2.15 [LeetCode 79] Word Search
    19.2.15 [LeetCode 78] Subsets
    19.2.15 [LeetCode 77] Combinations
    19.2.15 [LeetCode 76] Minimum Window Substring
    19.2.13 [LeetCode 75] Sort Colors
    19.2.13 [LeetCode 74] Search a 2D Matrix
    19.2.13 [LeetCode 73] Set Matrix Zeroes
    19.2.13 [LeetCode 72] Edit Distance
    19.2.13 [LeetCode 71] Simplify Path
  • 原文地址:https://www.cnblogs.com/fger/p/13852479.html
Copyright © 2011-2022 走看看