---
title: Working with timestamps
description: A blog post containing advice for understanding and working with the timestamps in log files written by Ultrasonic Personal Air Samplers (UPAS).
image: https://www.accsensors.com/hubfs/World_Time_Zones_Map.png
---

[Skip to content](https://www.accsensors.com/blog/working-with-timestamps-in-upas-log-files#main-content)

[![AST](https://www.accsensors.com/hs-fs/hubfs/AST.jpg?width=2303&height=774&name=AST.jpg)](https://www.accsensors.com/)

- [Products](https://www.accsensors.com/products)
  
  Show submenu for Products 
  
    - [UPAS v2.1](https://www.accsensors.com/upasv2.1)
    - [UPAS v2.1 PLUS](https://www.accsensors.com/upasv2.1plus)
    - [UPAS v2.0](https://www.accsensors.com/upasv2.0)
    - [Home Health Box](https://www.accsensors.com/indoor_sampling)
    - [Inlets and Accessories](https://www.accsensors.com/accessories)
    - [UPAS Outdoor Enclosure](https://www.accsensors.com/upas_outdoor_enclosure)
    - [Sample Analysis Services](https://www.accsensors.com/sample_analysis)
- Technical Resources
  
  Show submenu for Technical Resources 
  
    - [Applications Blog](https://www.accsensors.com/blog)
    - [R Shiny Application](https://accsensors.shinyapps.io/shinyAST/)
    - [astr R Package](https://github.com/accsensors/astr)
    - [YouTube](https://www.youtube.com/channel/UCbbSB_ja8JY-xX90D94qyKA)
- Contact Us
  
  Show submenu for Contact Us 
  
    - [Request Free Demo](https://www.accsensors.com/freetrial)
    - [Request a Quote](https://www.accsensors.com/quote)
    - [Request Support](https://www.accsensors.com/support-request-form)
    - [Our Team](https://www.accsensors.com/about)
    - [Distributors](https://www.accsensors.com/distributors)

Open main navigation

Close main navigation

- [Products](https://www.accsensors.com/products)
  
  Show submenu for Products 
  
    - [UPAS v2.1](https://www.accsensors.com/upasv2.1)
    - [UPAS v2.1 PLUS](https://www.accsensors.com/upasv2.1plus)
    - [UPAS v2.0](https://www.accsensors.com/upasv2.0)
    - [Home Health Box](https://www.accsensors.com/indoor_sampling)
    - [Inlets and Accessories](https://www.accsensors.com/accessories)
    - [UPAS Outdoor Enclosure](https://www.accsensors.com/upas_outdoor_enclosure)
    - [Sample Analysis Services](https://www.accsensors.com/sample_analysis)
- Technical Resources
  
  Show submenu for Technical Resources 
  
    - [Applications Blog](https://www.accsensors.com/blog)
    - [R Shiny Application](https://accsensors.shinyapps.io/shinyAST/)
    - [astr R Package](https://github.com/accsensors/astr)
    - [YouTube](https://www.youtube.com/channel/UCbbSB_ja8JY-xX90D94qyKA)
- Contact Us
  
  Show submenu for Contact Us 
  
    - [Request Free Demo](https://www.accsensors.com/freetrial)
    - [Request a Quote](https://www.accsensors.com/quote)
    - [Request Support](https://www.accsensors.com/support-request-form)
    - [Our Team](https://www.accsensors.com/about)
    - [Distributors](https://www.accsensors.com/distributors)
- [Try for Free](https://www.accsensors.com/freetrial)

[Try for Free](https://www.accsensors.com/freetrial)

 Oct 16, 2024, 12:02:10 PM

# Working with timestamps

![Picture of Jessica Tryner](https://www.accsensors.com/hs-fs/hubfs/JT_20250309_square.jpeg?width=50&name=JT_20250309_square.jpeg) [Jessica Tryner](https://www.accsensors.com/blog/author/jessica-tryner)

Share: [facebook-f icon](http://www.facebook.com/share.php?u=https://www.accsensors.com/blog/working-with-timestamps-in-upas-log-files) [linkedin-in icon](http://www.linkedin.com/shareArticle?mini=true&url=https://www.accsensors.com/blog/working-with-timestamps-in-upas-log-files) [Twitter icon](https://twitter.com/intent/tweet?url=https://www.accsensors.com/blog/working-with-timestamps-in-upas-log-files) [pinterest-p icon](http://pinterest.com/pin/create/link/?url=https://www.accsensors.com/blog/working-with-timestamps-in-upas-log-files) [envelope icon](mailto:?body=https://www.accsensors.com/blog/working-with-timestamps-in-upas-log-files)

# Timestamps in UPAS log files

In log files written by [Ultrasonic Personal Air Samplers](https://www.accsensors.com/products) (UPAS), you'll find each timestamp recorded two different ways: (1) in [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) and (2) in the presumed local time in the sample location (more on that "presumed" part [later](https://www.accsensors.com/blog/working-with-timestamps-in-upas-log-files#presumed)...).

In the SAMPLE SUMMARY section of the log file header, you'll find the following timestamps:

- StartDateTimeUTC: Sample start time displayed in Coordinated Universal Time
- StartDateTimeLocal: Sample start time displayed in the local time zone associated with the sample
- EndDateTimeUTC: Sample end time displayed in Coordinated Universal Time
- EndDateTimeLocal: Sample end time displayed in the local time zone associated with the sample.

StartDateTimeUTC and StartDateTimeLocal are really the same time, just displayed in different time zones. The same is true of EndDateTimeUTC and EndDateTimeLocal.

In the SAMPLE LOG, you'll also find the timestamp for each line of data displayed in both Coordinated Universal Time (DateTimeUTC) and the local time zone (DateTimeLocal).

Additionally, in the SETUP SUMMARY section of the log file header, you'll find the GPSUTCOffset parameter, which indicates the difference, in hours, between the UTC and local timestamps recorded in the log file.  For example, if the GPSUTCOffset is -7.00, then local timestamps will be seven hours behind UTC timestamps.  In this case, a UTC time of 2024-07-11T18:02:30 will correspond to a local time of 2024-07-11T11:02:30.

# How does the UPAS know what time it is?

The UPAS operates and logs data in UTC.  When the UPAS is first built, it doesn't know what time it is.  During manufacturing, we take the UPAS outside so the integrated GPS module can get the time from GPS satellites.  After that, a [real-time clock](https://en.wikipedia.org/wiki/Real-time_clock) inside the UPAS keeps track of Coordinated Universal Time.

If the UPAS is stored for a while with a dead battery, the real-time clock inside the UPAS can lose power and then the UPAS will lose track of the time. The UPAS won't operate if it doesn't know the time. If you turn on a [UPAS v2.0](https://www.accsensors.com/upasv2.0), or a [UPAS v2.1](https://www.accsensors.com/upasv2.1) or [v2.1 PLUS](https://www.accsensors.com/upasv2.1plus) that is running firmware revision <200, only to find that the button LED is blinking pink and you can't connect to the app over Bluetooth, that's because the UPAS doesn't know the time and needs to communicate with GPS satellites to get the time. You'll need to [take the UPAS outside](https://youtu.be/2F_VdnLDGzc?feature=shared) to a location where it has an unobstructed view of the sky for a few minutes. Clouds won't affect your ability to get GPS signal, but lots of trees and tall buildings might. It should only take a few minutes for the UPAS to get the time and the LED to turn solid pink. If the LED is still blinking pink after 15 minutes, try moving to a location further away from tall buildings. If a [UPAS v2.1](https://www.accsensors.com/upasv2.1) or [v2.1 PLUS](https://www.accsensors.com/upasv2.1plus) running firmware revision ≥200 loses track of the time and can't get a GPS signal, it will be able to connect to the mobile app and get Coordinated Universal Time from the mobile device.

The UPAS assumes that the local time zone is the same as the time zone on the mobile device used to program the sample.  All local timestamps in the UPAS log file are really the UTC time displayed in the time zone associated with the device used for programming. 

# Do the local timestamps in your log file look wrong? 

There are some scenarios in which the local timestamps written to the log file might not reflect the actual local time where the sample was collected: 

1. Did you travel from one part of the world to another and leave your phone or tablet in "airplane mode" so that the time on your phone or tablet still reflected the time zone you traveled from?  In that case, the local timestamps in your UPAS log files will also reflect the time zone you traveled from. 
2. Did you program the UPAS in advance of the sample using the "start at next power on" or "always start on next power-on" feature and then take or ship the UPAS to a different time zone to collect the sample?  In that case, the local timestamps in your UPAS log files will reflect the time zone where the UPAS was programmed. 
3. Did daylight saving time start or end between the time when your sample was programmed and the time when your sample ended?  The UPAS stores the offset between UTC and local time as a fixed value (in hours) at the time when the sample settings were programmed.  If daylight saving time starts or ends between the time when the sample is programmed and the time when the sample ends, the UPAS will not update the offset between UTC and the local time. 

If you find yourself in one of these scenarios, have no fear.  The UTC timestamps in your log file are still correct and will always be correct! Coordinated Universal Time remains the same no matter where in the world you travel and whether or not daylight saving time is in effect in any particular location.  That's why researchers who collect time-resolved data in a lot of different locations often prefer to work in UTC instead of local time.  Additionally, you can display Coordinated Universal Times in any time zone you prefer when post-processing your data. 

# How are these timestamps handled in R?

In the R programming environment, [times](https://r4ds.hadley.nz/datetimes.html) are stored using the [POSIXct](https://www.stat.berkeley.edu/~s133/dates.html) class.  The POSIXct class and [lubridate](https://lubridate.tidyverse.org/) package make it easy to keep track of timestamps and display them in different time zones.   

When you read log files into R using the `read_ast_header()` and `read_ast_log()` functions in our [astr](https://github.com/accsensors/astr/) package, all UTC and local timestamps will be converted to POSIXct objects in the resulting data frame(s). UTC timestamps from the log file will be displayed in Coordinated Universal Time.  

If you do not specify the optional `tz` argument when calling the `read_ast_header()` and `read_ast_log()` functions, all local timestamps from the log file will be displayed in the time zone associated with the GPSUTCOffset from the file header.  If you want local timestamps to be displayed in a different time zone, pass the [name of that time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to the optional `tz` argument.

Here's a real-world example in which the local timestamps in a set of UPAS log files were "wrong" and I specified the optional `tz` argument in the `read_ast_header()` and `read_ast_log()` functions to display local timestamps in the correct time zone: For a recent field campaign, I programmed UPAS in Colorado (UTC-06:00 during daylight saving time) to "always start on next power-on." Then, I shipped those UPAS to California (UTC-07:00 during daylight saving time), where study participants turned them on and collected particulate matter samples. Because I programmed the UPAS in Colorado, using my mobile phone that was set to Mountain Daylight Time, the GPSUTCOffset in each log file was -6.00; however, the UTC offset in actual sampling location was -7:00.  When I read these log files into R, I specified the `tz` argument in the `read_ast_header()` and `read_ast_log()` functions as `tz = "America/Los_Angeles"` so that local timestamps would be displayed in the correct time zone. 

Finally, it's helpful to consider the following:

- The UTC and local versions of each timestamp are *really the same value*, just displayed in different time zones (unless your local time zone is Greenwich Mean Time; in that case, the UTC and local timestamps will be displayed in the same time zone). 
- If you read multiple log files into R and then bind the rows of the resulting data frames to create a single data frame, all local timestamps will be displayed in the local time zone associated with the first data frame, because a single POSIXct vector can only store one time zone. 

# Best practice for working with timestamps

In general, we recommend working in Coordinated Universal Time (like the UPAS does).  UTC timestamps recorded by the UPAS will always be correct and you can use the `with_tz()` function from the R package [lubridate](https://cran.r-project.org/web/packages/lubridate/index.html) to display UTC timestamps in any other time zone. 

# Additional resources

You can install the [astr](https://github.com/accsensors/astr) package from GitHub!  This package makes it easier to work with log files recorded by Access Sensor Technologies air samplers in the R programming environment.  The [astr](https://github.com/accsensors/astr) package can read log files written by [UPAS v2.0](https://www.accsensors.com/upasv2.0) (running firmware version ≥ 100), [UPAS v2.1](https://www.accsensors.com/upasv2.1), [UPAS v2.1 PLUS](https://www.accsensors.com/upasv2.1plus), and [Home Health Box](https://www.accsensors.com/indoor_sampling).

[UPAS v2.0](https://www.accsensors.com/blog/tag/upas-v2-0), [UPAS v2.1](https://www.accsensors.com/blog/tag/upas-v2-1), [UPAS v2.1 PLUS](https://www.accsensors.com/blog/tag/upas-v2-1-plus)

## Related posts

[![A photograph of a UPAS v2.1 PLUS with a respirable PM inlet installed. A PM10 inlet and a flow check adapter are also sitting nearby in the image.](https://www.accsensors.com/hs-fs/hubfs/NewFirmwareBlog_CoverImage.jpg?height=200&name=NewFirmwareBlog_CoverImage.jpg)](https://www.accsensors.com/blog/new-firmware)

[UPAS v2.1](https://www.accsensors.com/blog/tag/upas-v2-1), [UPAS v2.1 PLUS](https://www.accsensors.com/blog/tag/upas-v2-1-plus)

## [Introducing the new UPAS v2.1 and v2.1 PLUS firmware](https://www.accsensors.com/blog/new-firmware)

![Picture of Jessica Tryner](https://www.accsensors.com/hs-fs/hubfs/JT_20250309_square.jpeg?width=50&name=JT_20250309_square.jpeg) [Jessica Tryner](https://www.accsensors.com/blog/author/jessica-tryner) 

 May 12, 2025, 8:19:23 PM

Access Sensor Technologies has improved our UPAS v2.1 and UPAS v2.1 PLUS firmware to make UPAS...

[Read more](https://www.accsensors.com/blog/new-firmware)

[![A diagram pointing out the features that can be used to distinguish the UPAS v2.0, UPAS v2.1, and UPAS v2.1 PLUS](https://www.accsensors.com/hs-fs/hubfs/BlogPost_WhichUPAS_Cover.png?height=200&name=BlogPost_WhichUPAS_Cover.png)](https://www.accsensors.com/blog/which-upas)

[UPAS v2.0](https://www.accsensors.com/blog/tag/upas-v2-0), [UPAS v2.1](https://www.accsensors.com/blog/tag/upas-v2-1), [UPAS v2.1 PLUS](https://www.accsensors.com/blog/tag/upas-v2-1-plus)

## [Which UPAS model do I have?](https://www.accsensors.com/blog/which-upas)

![Picture of Jessica Tryner](https://www.accsensors.com/hs-fs/hubfs/JT_20250309_square.jpeg?width=50&name=JT_20250309_square.jpeg) [Jessica Tryner](https://www.accsensors.com/blog/author/jessica-tryner) 

 May 26, 2026, 5:58:14 PM

Access Sensor Technologies has sold three different versions of our Ultrasonic Personal Air Sampler...

[Read more](https://www.accsensors.com/blog/which-upas)

[![Photograph of UPAS inside a laboratory test enclosure](https://www.accsensors.com/hs-fs/hubfs/Blog_DutyCycling_Header-1.jpg?height=200&name=Blog_DutyCycling_Header-1.jpg)](https://www.accsensors.com/blog/all-about-duty-cycling)

[UPAS v2.0](https://www.accsensors.com/blog/tag/upas-v2-0), [UPAS v2.1](https://www.accsensors.com/blog/tag/upas-v2-1), [UPAS v2.1 PLUS](https://www.accsensors.com/blog/tag/upas-v2-1-plus)

## [All about duty cycling](https://www.accsensors.com/blog/all-about-duty-cycling)

![Picture of Jessica Tryner](https://www.accsensors.com/hs-fs/hubfs/JT_20250309_square.jpeg?width=50&name=JT_20250309_square.jpeg) [Jessica Tryner](https://www.accsensors.com/blog/author/jessica-tryner) 

 Aug 5, 2024, 9:30:56 PM

What is duty cycling? Duty cycling refers to the practice of operating the Ultrasonic Personal Air...

[Read more](https://www.accsensors.com/blog/all-about-duty-cycling)

###### [Products](https://www.accsensors.com/products)

[UPAS v2.1](https://www.accsensors.com/upasv2.1)

[UPAS v2.1 PLUS](https://www.accsensors.com/upasv2.1plus)

[UPAS v2.0](https://www.accsensors.com/upasv2.0)

[Home Health Box](https://www.accsensors.com/indoor_sampling)

[Inlets and Accessories](https://www.accsensors.com/accessories)

[UPAS Outdoor Enclosure](https://www.accsensors.com/upas_outdoor_enclosure)

[Sample Analysis](https://www.accsensors.com/sample-analysis)

###### Technical Resources

[Applications Blog](https://www.accsensors.com/from-the-access-sensor-tech-team)

[R Shiny Application](https://accsensors.shinyapps.io/shinyAST/)

[astr R Package](https://github.com/accsensors/astr)

[YouTube](https://www.youtube.com/channel/UCbbSB_ja8JY-xX90D94qyKA)

 

 

 

###### Contact Us

[Request a Free Demo](https://www.accsensors.com/freetrial)

[Request a Quote](https://www.accsensors.com/quote)

[Request Support](https://www.accsensors.com/support-request-form)

[Our Team](https://www.accsensors.com/about)

[Distributors](https://www.accsensors.com/en-us/distributors)

[contact@accsensors.com](mailto:contact@accsensors.com)

 

 

###### Legal

[Privacy Policy](https://www.accsensors.com/privacypolicy)

[Terms and Conditions](https://www.accsensors.com/termsanduse)

[FCOI](https://www.accsensors.com/fcoi)

 

 

 

 

[linkedin-in icon](https://www.linkedin.com/company/access-sensor-technologies/mycompany/?viewAsMember=true) [Check out our YouTube channel.](https://www.youtube.com/channel/UCbbSB_ja8JY-xX90D94qyKA) [Link to our GitHub](https://github.com/accsensors)

---

Access Sensor Technologies | 320 E Vine Dr. Ste. 221 | Fort Collins, CO 80524

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Jessica Tryner",
    "url" : "https://www.accsensors.com/blog/author/jessica-tryner"
  },
  "dateModified" : "2026-05-18T03:06:01.515Z",
  "datePublished" : "2024-10-16T18:02:10.000Z",
  "headline" : "Working with timestamps",
  "image" : [ "https://www.accsensors.com/hubfs/World_Time_Zones_Map.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://www.accsensors.com/blog/working-with-timestamps-in-upas-log-files",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://www.accsensors.com/hubfs/AST%20Logo%20Small.png"
    },
    "name" : "Access Sensor Technologies"
  }
}
```