Date format issue on order_create mutation

Hi,

I’m having date format issue in order_create mutation in the PROD/LIVE environment (this issue is not happening in the TEST environment), I specified the order_date field value as “2021-07-06”, which supposed to be 6 July 2021 (following the format in the example page for order_create mutation) . But for some reason when I retrieve the order back thru the orders query, ShipHero actually saving the data as “2021-06-07” (7 June 2021), so it seems to be reversing the date and month component. I’ve confirmed that it’s storing the date as 7 June into the DB, because I’m seeing 2 different date in the order history vs the order date information (by right the order is created today and processed today as well, so both dates should reflect 6 July). Below result from the order query when I extract back the order. Please refer to the dates in bold
{
“data”: {
“orders”: {
“request_id”: “60e4765ff60c43047b5f5f04”,
“complexity”: 201,
“data”: {
“pageInfo”: {
“hasNextPage”: false
},
“edges”: [
{
“cursor”: “YXJyYXljb25uZWN0aW9uOjA=”,
“node”: {
“id”: “T3JkZXI6MjAxMTQ4ODE0”,
“legacy_id”: 201148814,
“order_number”: “319915”,
“partner_order_id”: “Vareya - Dummy 11”,
“shop_name”: “public-api”,
“fulfillment_status”: “fulfilled”,
"order_date": “2021-06-07T00:00:00”,
“total_tax”: “0”,
“subtotal”: “0”,
“total_discounts”: “0”,
“total_price”: “0”,
“auto_print_return_label”: false,
“custom_invoice_url”: null,
“account_id”: “QWNjb3VudDo2MjU1OA==”,
“email”: “”,
“profile”: “default”,
“packing_note”: “”,
“required_ship_date”: “2021-10-07T00:00:00”,
“flagged”: false,
“saturday_delivery”: false,
“ignore_address_validation_errors”: false,
“priority_flag”: false,
“source”: “api”,
“third_party_shipper”: {
“zip”: “None”,
“account_number”: null,
“country”: “None”
},
“gift_invoice”: false,
“order_history”: [
{
"created_at": “2021-07-06T12:05:30”,
“information”: “Order created from public-api”,
“user_id”: “VXNlcjoxNDExMDQ=”
},
{
“created_at”: “2021-07-06T13:00:40”,
“information”: “

Shipping Carrier updated from <strong class=“text-info”>Asendia to <strong class=“text-info”>api

Shipping Method updated from <strong class=“text-info”>E-PAQ Standard to <strong class=“text-info”>Asendia

”,
“user_id”: “VXNlcjoxMTExNjQ=”
},
{
“created_at”: “2021-07-06T13:01:02”,
“information”: “

Shipping City added: <strong class=“text-success”>Etten-Leur

Shipping State/Province removed: <strong class=“text-error”>LA Etten-Leur

Shipping Zip updated from <strong class=“text-info”>4877 to <strong class=“text-info”>4877LA

”,
“user_id”: “VXNlcjoxMTExNjQ=”
},
{
“created_at”: “2021-07-06T13:01:34”,
“information”: “

Shipping Carrier updated from <strong class=“text-info”>api to <strong class=“text-info”>dhl_express

Shipping Method updated from <strong class=“text-info”>Asendia to <strong class=“text-info”>N

”,
“user_id”: “VXNlcjoxMTExNjQ=”
},
{
“created_at”: “2021-07-06T13:01:46”,
“information”: “This order shipped by 5 5 printed using shipping web”,
“user_id”: “VXNlcjow”
}
],
“allow_partial”: false,
“require_signature”: false,
“adult_signature_required”: false,
“alcohol”: false,
“expected_weight_in_oz”: “480.00”,
“insurance”: false,
“insurance_amount”: “0.00”,
“currency”: null,
“has_dry_ice”: false,
“allocation_priority”: 0,
“allow_split”: false,
“line_items”: {
“edges”: [
{
“node”: {
“sku”: “WT1531”,
“quantity”: 3,
“quantity_allocated”: 0,
“quantity_pending_fulfillment”: 0,
“backorder_quantity”: 0,
“promotion_discount”: “0.00”,
“warehouse_id”: “V2FyZWhvdXNlOjU3NjU4”
}
}
]
}
}
}
]
}
}
}
}

Kindly advice why it’s translating the date and month in reverse way when storing into DB and not reading the date specified in the order_create according to ISODateTime standard as per the documentation. I noticed that this behavior is different between TEST vs PROD environment, as in TEST environment it’s treating the date and month component and storing it into DB correctly.

Please ignore this. Found that the issue is coming from the source system.

1 Like

ok, great, thanks for the update!