Library not found wiring.h using datetime example

I have a strange problem
adruino IDE is not finding the library even it is in the same folder as the code.

And it is also in the library folder as well

I used the standard example .

include <wiring.h> is referenced from DateTime lib.

I downloaded the example and trid to compile it

Error: No such file or directory #include <wiring.h>

#include <DateTime.h>
#include <DateTimeStrings.h>

#define TIME_MSG_LEN  11   // time sync to PC is HEADER and unix time_t as ten ascii digits
#define TIME_HEADER  255   // Header tag for serial time sync message

void setup(){

void  loop(){  
  getPCtime();   // try to get time sync from pc        
  if(DateTime.available()) { // update clocks if time has been synced
    unsigned long prevtime =; 
    while( prevtime == )  // wait for the second to rollover
    DateTime.available(); //refresh the Date and time properties
    digitalClockDisplay( );   // update digital clock

    // send our time to an app listening on the serial port
    Serial.print( TIME_HEADER,BYTE); // this is the header for the current time

void getPCtime() {
  // if time available from serial port, sync the DateTime library
  while(Serial.available() >=  TIME_MSG_LEN ){  // time message
    if( == TIME_HEADER ) {        
      time_t pctime = 0;
      for(int i=0; i < TIME_MSG_LEN -1; i++){   
        char c=;          
        if( c >= '0' && c <= '9')   
          pctime = (10 * pctime) + (c - '0') ; // convert digits to a number            
      DateTime.sync(pctime);   // Sync DateTime clock to the time received on the serial port

void digitalClockDisplay(){
  // digital clock display of current time
  Serial.print(" "); 
  Serial.print(" ");  
  Serial.print(" ");
  Serial.println(DateTime.Day, DEC);   

void printDigits(byte digits){
  // utility function for digital clock display: prints colon and leading 0
  if(digits < 10)

That is a very old library. You can fix the problem by changing:

#include <wiring.h>


#include <Arduino.h>

However, you might have noticed a helpful message on that page:

This library has been superseded by a newer version that is available here

So why are you using the version of the library that they’re telling you not to use? If you use the Time library instead you won’t have the wiring.h problem and you might find that there have been improvements in the many years since the DateTime library was written.

looks I missed this small hint: :confused:

will check this now