Skip to content

Commit

Permalink
Merge pull request #426 from GSA-TTS/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
ximekilgsa authored Oct 2, 2024
2 parents 46f4ef0 + c5e3903 commit 0471b16
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ module.exports = function (config) {
}

// Format the datetime string for timestamp conversion
const formattedDatetime = `${date} ${String(hours).padStart(2, "0")}:${minutes} EST`;
const formattedDatetime = `${date} ${String(hours).padStart(2, "0")}:${minutes} ET`;

// Convert to timestamp (in seconds)
const timestamp = Math.floor(new Date(formattedDatetime).getTime() / 1000);
Expand Down
2 changes: 1 addition & 1 deletion _data/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ services:
logo: _img/LOGO_votegov_2024.png
logo_alt_text: Vote
category: platforms
description: The digital authoritative, trusted source for voting information.
description: The trusted source for accurate, official voting information from the U.S. government to the American public. Vote.gov’s mission is to make it easy for all eligible voters to understand how to register and vote.
- name: Centers of Excellence
link: https://coe.gsa.gov
link_alt_text: Link to COE homepage
Expand Down
30 changes: 6 additions & 24 deletions _includes/layouts/jointts/info-sessions-sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,13 @@
<h3 class="usa-summary-box__heading">Find out more</h3>
<div class="usa-summary-box__text">
<p>Join us at one of our monthly online information sessions. Come learn more about working at TTS, available positions, and our application process. Register for a session below.</p>
<ul class="info-sessions-list">
<ul>
{% for session in sorted_info_sessions %}
<!-- Format the date for comparison -->
{% assign session_date = session.date | date: "%Y-%m-%d" %}

<!-- Extract ET time range from session.time (e.g., "1:00-2:00pm ET") -->
{% assign time_et = session.time-et | split: " ET" %}

<!-- Extract start time and end time (e.g., "1:00pm" and "2:00pm") -->
{% assign session_end_time = time_et | split: "-" | last | strip %}

<!-- Combine the date with the start and end times -->
{% assign session_end_str = session_date | append: " " | append: session_end_time %}

{% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %}

{% assign now = 'now' | date: "%s" %}

{% if sessionEndTimestamp > now %}
<li class="info-session" data-session-end-timestamp="{{ sessionEndTimestamp }}">
<a target="_blank" href="{{ session.link | url }}" rel="noopener">{{ session.date | date: "%A, %B %d, %Y" }}</a>
<p>{{ session.time-et }}</p>
<p>({{ session.time-pt }})</p>
</li>
{% endif %}
<li class="info-session" data-session-end-timestamp="{{ sessionEndTimestamp }}">
<a target="_blank" href="{{ session.link | url }}" rel="noopener">{{ session.date | date: "%A, %B %d, %Y" }}</a>
<p>{{ session.time-et }}</p>
<p>({{ session.time-pt }})</p>
</li>
{% endfor %}
</ul>
</div>
Expand Down
53 changes: 43 additions & 10 deletions _includes/layouts/jointts/job-listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,27 @@ <h1>{{ title }}</h1>
{% assign future_sessions = false %}

{% for session in sorted_info_sessions %}
{% assign session_date = session.date | date: "%s" %}
{% if session_date > now %}
{% assign future_sessions = true %}
{% break %}
{% endif %}
<!-- Format the date for comparison -->
{% assign session_date = session.date | date: "%Y-%m-%d" %}

<!-- Extract ET time range from session.time (e.g., "1:00-2:00pm ET") -->
{% assign time_et = session.time | split: " ET" | first %}

<!-- Extract start time and end time (e.g., "1:00pm" and "2:00pm") -->
{% assign session_end_time = time_et | split: "-" | last | strip %}

<!-- Combine the date with the start and end times -->
{% assign session_end_str = session_date | append: " " | append: session_end_time %}

{% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %}

<!-- Check if session is still upcoming or ongoing -->
{% if sessionEndTimestamp > now %}
{% assign future_sessions = true %}
{% break %}
{% endif %}
{% endfor %}

{% if future_sessions %}
<div class="usa-summary-box">
<div class="usa-summary-box__body">
Expand All @@ -46,12 +61,30 @@ <h3 class="usa-summary-box__heading">
</h3>
<div class="usa-summary-box__text" markdown="1">
Attend an information session to learn more about these roles, working at TTS, and our application process. Register for a session using the links below.
<ul>
<ul class="info-sessions-list">
{% for session in sorted_info_sessions %}
{% assign session_date = session.date | date: "%s" %}
{% if session_date > now %}
<li class="info-session">
<p><a href="{{ session.link | url }}">{{session.headline}}</a> at {{session.time}}</p>
<!-- Format the date for comparison -->
{% assign session_date = session.date | date: "%Y-%m-%d" %}

<!-- Extract ET time range from session.time (e.g., "1:00-2:00pm ET") -->
{% assign time_et = session.time | split: " ET" | first %}

<!-- Extract start time and end time (e.g., "1:00pm" and "2:00pm") -->
{% assign session_end_time = time_et | split: "-" | last | strip %}

<!-- Combine the date with the start and end times -->
{% assign session_end_str = session_date | append: " " | append: session_end_time %}

{% capture sessionEndTimestamp %}{% getDateTimeinSeconds session_end_str %}{% endcapture %}

{{ session_end_time }}
{{ sessionEndTimestamp }}
{{ now }}

<!-- Show if session is still ongoing or upcoming -->
{% if sessionEndTimestamp > now %}
<li data-session-end-timestamp="{{ sessionEndTimestamp }}">
<p><a href="{{ session.link | url }}">{{ session.date | date: "%A, %B %d, %Y" }}</a> at {{session.time}}</p>
</li>
{% endif %}
{% endfor %}
Expand Down
3 changes: 3 additions & 0 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@
const currentTimestamp = Math.floor(new Date(now).getTime() / 1000);

const infoSessionsGroup = document.querySelectorAll(".info-sessions-list");

infoSessionsGroup.forEach(sessionGroup => {
let visibleSessions = 0;

// Convert sessionGroup.children to an array and loop over them
Array.from(sessionGroup.children).forEach(session => {
const session_timestamp = session.getAttribute('data-session-end-timestamp');

console.log(currentTimestamp);

// Hide past sessions
if (session_timestamp < currentTimestamp) {
session.style.display = 'none'; // Hide past session
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# 8. Represent time with ISO-8601 and Eastern Time

Date: 2024-09-25

## Status

Accepted

## Context

ISO 8601 is a very common date / time representation standard.
Eastern Time (i.e., `America/New_York` or UTC-5 during Standard
Time and UCT-4 during Daylight Saving Time) is the most
frequently-used time zone on the project.

### ISO 8601

ISO-8601 is a date / time standard for representing a time (or interval
of times) in a structured manner. Generally speaking, the most significant
and least specific component (the year) is in the left-most position and
each subsequent is less significant / more specific component follows to
the right. A `T` (capital letter T) is used to separate the date from the
time.

#### Examples

##### Date Only

`YYYY-MM-dd`

- 4 digits of the year
- hyphen
- 2 digits (0-padded) of the month
- hyphen
- 2 digits (again, 0-padded) of the day of month

In this case, a date (e.g., 2024-09-25) actually represents the
start of that date. That is, '2024-09-25' is exactly the same
as '2024-09-25 00:00'.

##### Date and Time

`YYYY-MM-ddTHH:mm`

- (same as "Date Only")
- T (the letter 'T')
- 2 digits (0-padded, 24-hour clock) of the hour
- colon
- 2 digits (0-padded) of the minute

#### Omitted Components

In general, if omitted, components are assumed to be zero (0). So,
for example, if only a date is represented, the time is assumed to
be zero (i.e., midnight).

A consequence of this is when representing the end of an interval
(e.g., `closing` on a job posting), if a time is omitted (e.g.,
'2024-09-25'), points in time on that date (e.g., 9am) would be
**after** the closing date as '2024-09-25T00:00' is less than
'2024:09-25T09:00'.

As a deviance from this, an adjustment to the default time is
required:

- for `opens` values, assume the time is 00:00
- for `closes` values, assume the time is 23:59

### Time Zone

The overwhelming majority of instances where dates are times are used
are relative to Eastern Time (i.e., the `America/New_York` time zone).
That is, job `opens` and `closes` fields, times for info sessions, etc.
are pretty much all Eastern time. Moreover, the folks who edit the
job postings and such use an Eastern Time perspective.

## Decision

The team will use ISO-8061 date time values in `America/New_York`
to represent dates and times internally. This is most significant
for job postings and info sessions.

## Consequences

### Job Postings

Job posting `opens` and `closes` values will be represented in
the time zone used most frequently and by the most people.

### Display Logic

Job postings and info sessions will be displayed in Eastern
Time.

### Time-Based State Inference

The server runs in UTC. Therefore, when considering whether
a job posting is upcoming, open, or closed, the current time
needs to be "cast" into Eastern Time prior to any inferences
being made.

#### Example

10pm (22:00) Eastern Time is either 2am (02:00) or 3am (03:00)
depending on Daylight Saving Time or not. Therefore, the
server -- which is set to UTC -- would report back that the
current date is actually one ahead of what's expected.

So, a job pobsting with a `closing` date of `2024-09-30T23:59`
would appear to be closed at 10pm (22:00) Eastern Time (which
is still in Daylight Saving) as the current time according
to the server would be `2024-10-01T02:00`.

Therefore, it's important to cast the current time from UTC into
Eastern Time so that the closing time (`2024-09-30T23:59`) is
*after* the current time cast into Eastern (`2024-09-30T22:00`).

See
[Luxon docs on time zones](https://github.com/moment/luxon/blob/master/docs/zones.md#changing-zones)
for more information.
8 changes: 8 additions & 0 deletions pages/jointts/positions/login-gov-data-analyist.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ role_summary: |
This position is a tactical, collaborative, outward-facing role that will require a blend of product and data expertise, a focus on consistency and quality, and a future-focused view for how Login.gov can use data in service of its mission.
qualifications: |
Provide as much detail as possible on your resume so that we can evaluate your
previous experience. Follow our [guidance on creating a federal style resume](https://join.tts.gsa.gov/resume/). Failure to provide required information may result in disqualification.
For each job on your resume, provide:
- The exact dates you held each job (from month/year to month/year or "present")
- Number of hours per week you worked (if part time)
# Make sure to leave the | on the first line. Start your content on the following line.
specialized_requirements: |
- Implementing and integrating appropriate technology, architecture, and tooling to support data science activities, including artificial intelligence/machine learning capabilities.
Expand Down

0 comments on commit 0471b16

Please sign in to comment.