# Movie Update TimeStamp to Theatrical Release Date

[![pknw1logo-white.png](https://bookstack.notflix.pknw1.co.uk/uploads/images/gallery/2025-01/scaled-1680-/HLPpknw1logo-white-png.png)](https://bookstack.notflix.pknw1.co.uk/uploads/images/gallery/2025-01/scaled-1680-/HLPpknw1logo-white-png.png)

##### `<span class="editor-theme-code">/usr/local/bin/releaseDate</span>`

<u>****Movie File Date/Time modifier****</u>

Reads the selected movie theatrical release date from previously stored metadata and sets the movie date and time to the release date so that it displays orderly in Plex

```
#!/bin/bash
# set releaseDate 

TS=$(cat "${1}" | jq '.releaseDate' | sed 's/"//g' | awk -FT '{print $1}' | awk -F- '{print $1$2$3}')0000.00
FOLDER=$(dirname "${1}")
if [ "${TS}" == "0000.00" ] || [ "${TS}" == "null0000.00" ]
then 
	echo "${FOLDER} invalid"
else
	echo "${TS} ${FOLDER}" || echo "${FOLDER} invalid"
	touch -a -m -t "${TS}" "${FOLDER}" || "${FOLDER} invalid"
	touch -a -m -t "${TS}" "${FOLDER}"/* || "${FOLDER} invalid"
fi

```

****execution****

<details id="bkmrk-script-infocheck-mar">- [ ] <span style="white-space: pre-wrap;">ensure the movie has been scraped </span>
- [ ] requires &lt;movie-name&gt;.nfo to exist
- [ ] parses nfo for release date
- [ ] updates the file timestamp

</details><u>****further info****</u>

<details id="bkmrk-product-homelinkdocu"><table><colgroup><col style="width: 240px;"></col><col style="width: 240px;"></col></colgroup><tbody><tr><td><u>****Product Home****</u>

</td><td>[Link](https://www.pknw1.co.uk)

</td></tr><tr><td><u>****Documentation****</u>

</td><td>[Link](https://www.pknw1.co.uk)

</td></tr><tr><td><u>****Github****</u>

</td><td>[Link](https://www.pknw1.co.uk)

</td></tr><tr><td><u>****DockerHub****</u>

</td><td>[Link](https://www.pknw1.co.uk)

</td></tr><tr><td><u>****Misc****</u>

</td><td>[Link](https://www.pknw1.co.uk)

</td></tr></tbody></table>

</details>more text more text