Sometimes it can depend upon the context. If it is a term of office for a particular position, the official expiry time will be specified in the charter or contract. For example, when a U.S. President is leaving office, his term officially expires at 12 noon on January 20th.
But traditionally if a guarantee or offer or contract or whatever says "Expires on July 31" or "Expiration date July 31", the offer is valid until 12 midnight on July 31st. By law in the US, unless otherwise specified in the fine print, such an offer is valid until the last second of the actual date listed.
Student or Learner