question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Transaction history is giving previous day instead of current day when a transaction is processed

See original GitHub issue

Describe the bug When a user purchases a ticket for an event on 01/29, the transaction history shows the date of purchase as being 01/28.

Expected behavior I expect that the transaction date should be whatever day the ticket was purchased.

Additional context

import React from 'react';
import {View, Text, StyleSheet, ScrollView} from 'react-native';
import EmptyTransactions from './EmptyTransactions';
import {Divider} from 'common-components';
import {v2Colors, v2Fonts} from 'theme';
import format from 'date-fns/format';
import PropTypes from 'prop-types';

const propTypes = {
  transactions: PropTypes.array,
};

const TransactionsTable = ({transactions = []}) => (
  <View style={styles.container}>
    <View style={styles.tableHeader}>
      <View style={styles.headerCol}>
        <Text style={styles.text}>{'DATE'}</Text>
      </View>
      <View style={styles.headerCol}>
        <Text style={styles.text}>{'PRODUCT'}</Text>
      </View>
      <View style={styles.headerCol}>
        <Text style={styles.text}>{'METHOD'}</Text>
      </View>
      <View style={styles.headerCol}>
        <Text style={styles.text}>{'$'}</Text>
      </View>
    </View>
    {!transactions.length && <EmptyTransactions />}
    {Boolean(transactions.length) && (
      <ScrollView showsVerticalScrollIndicator={false}>
        {transactions.map(t => (
          <View key={t.Key}>
            <View style={styles.tableRow}>
              <View style={styles.headerCol}>
                <Text style={styles.text}>
                  {format(t.DateTime, 'MM-DD-YYYY')}
                </Text>

The version number of date-fns is 1.29.0.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dkozickiscommented, May 2, 2020

I wish everyone spoke in Zulu time always 🤷🏻‍♂️

I will close this for now, please reopen if you’re able to provide a reproducer.

1reaction
papirocommented, May 1, 2020

@dkozickis @dcousens I apologize. Am I the only one who thinks date-times are complex? I didn’t realize that the container I was running tests in has a timezone of UTC:

root@ad1d2e1a7841:/workspaces/sa# date
Fri May  1 19:15:16 UTC 2020

I think I was then doing some sanity checks in my workspace, outside of the container… Didn’t notice they were different:

/home/pir3103/sa: date
Fri May  1 13:16:48 MDT 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

How Bank Transactions are Processed | M&T Bank
Debit card transactions are posted chronologically or when our records indicate the transaction was made, but checks (other than those cashed at an...
Read more >
T+1 (T+2, T+3) Explained: Definitions and Settlement Example
The "T" stands for transaction date, which is the day the transaction takes place. The numbers 1, 2, or 3 denote how many...
Read more >
Stock Settlement: Why You Need to Understand the T+2 ...
When does settlement occur? ... For most stock trades, settlement occurs two business days after the day the order executes, or T+2 (trade...
Read more >
Payment Processing reports: Approved Transactions, Pending ...
Approved (30 days not settled): The transaction was completed but not settled within the 30 day authorization period. EziDebit clients will see this...
Read more >
How transactions post | Overdraft Services | Chase.com
We may still return a transaction unpaid if your balance has insufficient funds during that business day's nightly processing, even if it had...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found